AS2 Incoming Messages

An AS2IncomingMessage is a single record created for each individual AS2 file transfer incoming from a Partner. It contains the message details and tracks the lifecycle status with milestones of the transfer.

List AS2 Incoming Messages

SDK Method

As2IncomingMessage.list()

Return Object

As2IncomingMessage[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import As2IncomingMessage from 'files.com/lib/models/As2IncomingMessage';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const as2IncomingMessages = await As2IncomingMessage.list();
  for (const as2IncomingMessage of as2IncomingMessages) {
    // Operate on as2IncomingMessage
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

The As2IncomingMessage Object

Some of the methods above return a As2IncomingMessage object. The attributes of this object are listed below.

AttributeDescription
id
int64
Id of the AS2 Partner.
workspace_id
int64
ID of the Workspace associated with this AS2 Incoming Message.
as2_partner_id
int64
Id of the AS2 Partner associated with this message.
as2_station_id
int64
Id of the AS2 Station associated with this message.
uuid
string
UUID assigned to this message.
content_type
string
Content Type header of the incoming message.
http_headers
object
HTTP Headers sent with this message.
processing_result
string
Result of processing.
Possible values: not_started, unable_to_find_station, unable_to_find_partner, unable_to_validate_signature, decrypt_fail, file_save_fail, success
processing_result_description
string
Result of processing description.
mic
string
AS2 Message Integrity Check
mic_algo
string
AS2 Message Integrity Check Algorithm Used
as2_to
string
AS2 TO header of message
as2_from
string
AS2 FROM header of message
message_id
string
AS2 Message Id
subject
string
AS2 Subject Header
date
string
Date Header
body_size
string
Encrypted Payload Body Size
attachment_filename
string
Filename of the file being received.
ip
string
IP Address of the Sender
created_at
date-time
Message creation date/time
http_response_code
string
HTTP Response Code sent for this message
http_response_headers
object
HTTP Headers sent for this message.
recipient_serial
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial
hex_recipient_serial
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial in hex format.
recipient_issuer
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s issuer
message_received
boolean
Message body received?
message_decrypted
boolean
Message decrypted successfully?
message_signature_verified
boolean
Message signature verified?
message_processing_success
boolean
Message processed successfully?
message_mdn_returned
boolean
MDN returned?
encrypted_uri
string
URL to download the encrypted signed smime that is to sent as AS2 body
smime_signed_uri
string
URL to download the file contents as smime with signature
smime_uri
string
URL to download the file contents encoded as smime
raw_uri
string
URL to download the original file contents
mdn_response_uri
string
URL to download the http response body