Documentation
Version 1.0

REST API Integration

View Full API List here

POST Authorize

API Documentation

MFT Gateway authorization end-point. After successfully authorized, you will receive two tokens api_token and refresh_token. The api_token must be included in the Authorization header of every protected API request. The refresh_token can be used for re-authorization process without user password by using “Referesh Auth Token” end-point.

POST Refresh Auth Token

API Documentation

This end-point can be used to re-authorize without entering user password, by using refresh-token received from initial authentication.

POST Send Message

API Documentation

Send(enqueue) AS2 message with single attachment. Please note that this endpoint does not supports for multipart payloads currently.

Request Headers

  • Authorization - Authorization header with auth token.
  • AS2-From - Station AS2 identifier which sends the message.
  • AS2-To - Partner AS2 identifier which intend to receive tha message.
  • Subject(optional) - Subject of the message. If not specified default subject configured for intended partner will be applied.
  • Attachment-Name(optional) - Name of the message attachment.
  • Content-Type(optional) - Attachment content type. Defaults to application/octet-stream.

Response Headers

  • Link - An absolute URL to the AS2 message which will be created after the outgoing message entry is processed. Therefore the resource in this URL may not be available immediately after the response for this API call is returned. It would be better to wait around 5 to 10 seconds before querying for the resource represented in the ​Link​ header value.

Similar to the MFT Gateway web dashboard​, this simply places the newly submitted message into a queue, in a queued(to-be-sent) state; it may take several seconds before the message actually gets sent out.

Additionally, if the actual send action fails, the message will not appear under the outbox; and the URL previously returned in the ​Link​ header would no longer be valid. In such cases it is advised to check outbox/failed and outbox/queued to find out the current status of the message.

4. POST Mark Received Message As UnRead

API Documentation

This end-point can be used to mark received AS2 message as API unread. Please note that result of this operation will not be affected on the MFT Gateway dashboard.

GET List Received Messages

API Documentation

This API endpoint can be used to list received messages with optional filters as query parameters.

General filters can be applied along with other filters(primary/secondary) without any restriction

  • sortDir​ - Sort direction. Possible values are ​asc​ and ​desc​. Defaults to ​desc​.
  • 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.
  • fetchAll - Fetch all messages including already been “marked as read” within the API scope. Defaults to false.

Primary filters have higher precedence over secondary filters. If apply both primary and secondary filters in a single API request, secondary filters will be ignored.

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

Secondary filters Can be apply single secondary filer per API request. Secondary filters will be applied in the listed order.

  • as2MessageId​​ - ID of the required AS2 message(s)
  • subject​ - Any subject string, to filter messages against

GET List Sent Messages

API Documentation

This API endpoint can be used to list successfully sent messages with optional filters as query parameters.

General filters can be applied along with other filters(primary/secondary) without any restriction

  • sortDir​ - Sort direction. Possible values are ​asc​ and ​desc​. Defaults to ​desc​.
  • 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.

Primary filters have higher precedence over secondary filters. If apply both primary and secondary filters in a single API request, secondary filters will be ignored.

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

  • Secondary filters Can be apply single secondary filer per API request. Secondary filters will be applied in the listed order.

  • as2MessageId​​ - ID of the required AS2 message(s)
  • subject​ - Any subject string, to filter messages against

GET List Queued Messages

API Documentation

This API endpoint can be used to list queued(pending-send) messages with optional filters as query parameters.

General filters can be applied along with other filters(primary/secondary) without any restriction

  • sortDir​ - Sort direction. Possible values are ​asc​ and ​desc​. Defaults to ​desc​.
  • 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.

Primary filters have higher precedence over secondary filters. If apply both primary and secondary filters in a single API request, secondary filters will be ignored.

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

  • Secondary filters Can be apply single secondary filer per API request. Secondary filters will be applied in the listed order.

  • as2MessageId​​ - ID of the required AS2 message(s)
  • subject​ - Any subject string, to filter messages against

GET List Failed Messages

API Documentation

This API endpoint can be used to list send failed messages with optional filters as query parameters.

General filters can be applied along with other filters(primary/secondary) without any restriction

  • sortDir​ - Sort direction. Possible values are ​asc​ and ​desc​. Defaults to ​desc​.
  • 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.

Primary filters have higher precedence over secondary filters. If apply both primary and secondary filters in a single API request, secondary filters will be ignored.

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

  • Secondary filters Can be apply single secondary filer per API request. Secondary filters will be applied in the listed order.

  • as2MessageId​​ - ID of the required AS2 message(s)
  • subject​ - Any subject string, to filter messages against

GET Retrieve Inbox(Received) Message

API Documentation

This API endpoint can be used to retrieve received message with optional markAsRead(Boolean) query param. If this is set to ​true​, the message will be “marked as read” upon retrieval. Defaults to true. Any list queries with fetchAll=false will not return it afterwards. You can combine this and the fetchAll query parameter, to ensure one-time processing of received messages. (Note that this marking happens only at API scope; marked messages may still appear as unread on the MFT Gateway web app inbox.)

GET Retrieve Outbox(Sent/Queued/Failed) Message

API Documentation

This API endpoint can be used to retrieve outbox(sent/queued/failed) message by AS2 message identifier.

GET Retrieve Inbox(Received) Message Attachment(s)

API Documentation

This API endpoint can be used to retrieve pre sign URL(s) to download received message attachment(s) from Amazon S3 bucket. Please note that validity of the S3 signed URL is limited to 10 minutes.

GET Retrieve Outbox(Sent/Queued/Failed) Message Attachment(s)

API Documentation

This API endpoint can be used to retrieve pre sign URLs to download received message attachment(s) from Amazon S3 bucket. Please note that validity of the S3 signed URL is limited 10 minutes.

GET Retrieve Inbox(Received) Message MDN

API Documentation

This API endpoint can be used to retrieve S3 pre sign URL to download Sent MDN from Amazon S3 bucket for a received message. Please note that validity of the S3 signed URL is limited 10 minutes.

GET Retrieve Outbox(Sent) Message MDN

API Documentation

This API endpoint can be used to retrieve S3 pre sign URLs to download a received MDN from Amazon S3 bucket for a successfully sent message. Please note that validity of the S3 signed URL is limited 10 minutes.