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 (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    as2_incoming_message "github.com/Files-com/files-sdk-go/v3/as2incomingmessage"
)

as2IncomingMessageIterator, err := as2_incoming_message.List(files_sdk.As2IncomingMessageListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for as2IncomingMessageIterator.Next() {
    as2IncomingMessage := as2IncomingMessageIterator.as2IncomingMessage()
}
err = as2IncomingMessageIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

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.
WorkspaceId
int64
ID of the Workspace associated with this AS2 Incoming Message.
As2PartnerId
int64
Id of the AS2 Partner associated with this message.
As2StationId
int64
Id of the AS2 Station associated with this message.
Uuid
string
UUID assigned to this message.
ContentType
string
Content Type header of the incoming message.
HttpHeaders
object
HTTP Headers sent with this message.
ProcessingResult
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
ProcessingResultDescription
string
Result of processing description.
Mic
string
AS2 Message Integrity Check
MicAlgo
string
AS2 Message Integrity Check Algorithm Used
As2To
string
AS2 TO header of message
As2From
string
AS2 FROM header of message
MessageId
string
AS2 Message Id
Subject
string
AS2 Subject Header
Date
string
Date Header
BodySize
string
Encrypted Payload Body Size
AttachmentFilename
string
Filename of the file being received.
Ip
string
IP Address of the Sender
CreatedAt
date-time
Message creation date/time
HttpResponseCode
string
HTTP Response Code sent for this message
HttpResponseHeaders
object
HTTP Headers sent for this message.
RecipientSerial
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial
HexRecipientSerial
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s serial in hex format.
RecipientIssuer
string
Incoming Message Recipient(the Client Cert used to encrypt this message)'s issuer
MessageReceived
boolean
Message body received?
MessageDecrypted
boolean
Message decrypted successfully?
MessageSignatureVerified
boolean
Message signature verified?
MessageProcessingSuccess
boolean
Message processed successfully?
MessageMdnReturned
boolean
MDN returned?
EncryptedUri
string
URL to download the encrypted signed smime that is to sent as AS2 body
SmimeSignedUri
string
URL to download the file contents as smime with signature
SmimeUri
string
URL to download the file contents encoded as smime
RawUri
string
URL to download the original file contents
MdnResponseUri
string
URL to download the http response body