This is a brief overview of the types of entities (payloads) returned by different endpoints of AS2 Gateway REST API.
An entity with a single message
(String) field,
returned as an acknowledgement of an action (e.g. submitting a message)
or an error description (e.g. failure to find an AS2 message by the given ID):
{"message": "Successfully added a new outbound entry"}
Represents an AS2 message sent/received by AS2 Gateway, with the following attributes:
as2MessageId
(String) - AS2 message ID
persistedTimestamp
(Long) - timestamp in milliseconds
compressed
(Boolean) - true
or false
depicting whether the AS2 message was compressed
encrypted
(Boolean) - true
or false
depicting whether the AS2 message was encrypted
signed
(Boolean) - true
or false
depicting whether the AS2 message was signed
subject
(String) - Subject of AS2 message. If there is no subject, this field will not be included in the response.
receiverId
(String) - AS2 ID of the AS2 partner
who has sent/received this message
senderId
(String) - AS2 ID of the AS2 station
which has received/sent this message
transportStatusReceived
(Integer, optional) - HTTP response code received. Only available on sent messages.
deliveryStatus
(String, optional) - AS2-level delivery status of the AS2 message. Only available on sent messages.
Possible values are Delivered
, Not Delivered
and No Status
.
mdnStatus
(String) - Delivery status of
MDN.
Possible values are Pending
, Received
, Not Requested
and No MDN
.
partnerType
(String) - AS2 Partner type. Possible values are Production
and Test
mdnMessage
(MDN Message, optional) - represents the MDN sent/received for this AS2 message
attachments
(Array of Attachments) - the attachments sent/received in this AS2 message
Represents a receipt, i.e. disposition notification (MDN) message received/sent by AS2 Gateway, with the following attributes:
persistedTimestamp
(Long) - timestamp in milliseconds when the message was saved in AS2 Gateway
mdnError
(Boolean) - true
or false
depicting whether the received MDN is an error MDN or not
content
(String) - String with human readable part of the MDN received
Represents details of a single attachment sent/received by AS2 Gateway (usually appearing within a list of attachments), with the following attributes:
name
(String) - attachment file name
size
(Integer) - size of the attachment in bytes
Represents a collection of entities (usually AS2 Messages) returned from a pagination-enabled endpoint (usually a list endpoint)
totalRecords
(Integer) - the total number of results that match the query
records
(Array) - a subset of those results based on the requested pageOffset
and pageLength
An example pagination response of AS2 Message entities would be as follows:
{ "totalRecords": 10, "records": [ { // an AS2 Message entity "as2MessageId": "<as2@message.id>", ..., "mdnMessage": { // (nested) an optional MDN Message entity "persistedTimestamp": 1556797479000, ... }, "attachments": [ // (nested) an array of Attachment entities { "name": "file1.txt", "size": 391 }, ... ] }, // more AS2 Message entities ] }