api icon

Listing AS2 Messages

These endpoints share a common set of query parameters (all optional):

  • sortCol​ - Column name to sort data. Possible values are ​persistedTimestamp​, ​receiverId, senderId​ and ​subject​. Defaults to ​persistedTimestamp​.

  • sortDir​ - Sort direction. Possible values are ​asc​ and ​desc​. Defaults to ​desc​.

  • partnerType​ - Possible values are ​production​ and ​test​. Default value is ​production​.

  • pageOffset​ - Page number. An integer value greater or equal to zero is accepted. Default is zero.

  • pageLength​ - Length of a page. An integer value greater than or equal to 1 and less than or equal to 100 is accepted. Default is 10.

  • partnerAS2Id​ - AS2 identifier of the AS2 Partner that sent/received these messages

  • stationAS2Id​ - AS2 identifier of the AS2 Station that received/sent these messages

  • as2MessageId​​ - ID of the required AS2 message(s)

  • subject​ - Any subject string, to filter messages against

For all successful responses,

Received

GET /:v/message/received

The ​received​ endpoint supports an additional ​unreadOnly​ (Boolean) flag (query parameter) to allow skipping of messages that have already been "marked as read" within the API scope. This can be useful for ensuring one-time processing of messages, e.g. retrieve a batch of unprocessed messages and then mark each as "read" when done.

Successfully sent

GET /:v/message/sent

Send-failed

GET /:v/message/failed

Since AS2 Gateway retries queued messages up to 10 times, and each retry uses the same AS2 message ID, the failed endpoint may return multiple messages with the same AS2 ID.

Queued (pending-send)

GET /:v/message/queued

For the ​queued​ endpoint, instead of ​partnerAS2Id​, ​stationAS2Id​, ​as2MessageId​, and ​subject​, there is a single parameter named ​query​ that can accommodate a single value from any of the four types.

For example, for checking a queued message with ID <​foo​>, use:

GET /:v/message/queued?query=<foo>

Currently, ​queued​ endpoint will only return messages that are not in "processing" status (actively being sent out at the moment of making the API call). Hence a given queued message may sometimes not appear in the retrieved list, although it may still be effectively in the queue.

In this topic
In this topic