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.

Replaying a retained message creates a new incoming message. Its replayed_from_message_id identifies the incoming-message record that was replayed. The original AS2 message_id is preserved. The source record ID remains available after that record is removed by message retention.

List AS2 Incoming Messages

SDK Method

As2IncomingMessage.List();

Return Object

FilesList<As2IncomingMessage>

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Additional Arguments

Example Request

using FilesCom.Models;

try
{
    var as2IncomingMessageIterator = As2IncomingMessage.List();
    await foreach (As2IncomingMessage as2IncomingMessage in as2IncomingMessageIterator.ListAutoPagingAsync()) {
        // Operate on as2IncomingMessage
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Show AS2 Incoming Message

SDK Method

As2IncomingMessage.Find();

Return Object

As2IncomingMessage

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Method Arguments

ArgumentDescription
id
int64
Required
As2 Incoming Message ID.

Example Request

using FilesCom.Models;

try
{
    var as2IncomingMessage = await As2IncomingMessage.Find(1L);
    // Operate on as2IncomingMessage
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Replay AS2 Incoming Message

SDK Method

as2IncomingMessage.Replay();

Return Object

As2IncomingMessage

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();

try
{
    // Find the as2IncomingMessage object by its id.
    var as2IncomingMessage = await As2IncomingMessage.Find(1L);
    await as2IncomingMessage.Replay(parameters);
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

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 this AS2 incoming message record.
replayed_from_message_id
int64
ID of the incoming message record this message was replayed from. Empty for messages received directly from a trading 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