Async HTTP itinerary step
HTTP itinerary step configuration
The HTTP itinerary step has the ability to start an asynchronous flow. This means the the step will send the message to a HTTP endpoint and here after break out of the itinerary flow until a response is received in form of a callback request.
To configure the step for an asynchronous flow click the “Async flow“ checkbox.
By default the “Use async response body as message” checkbox is checked. You can uncheck this in scenarios where the body of the async callback should not be used. This could be the case when calling an external endpoint for validation. In such a case you would normally only be interested in the status/error code received in the request HTTP headers.
HTTP request headers
HTTP headers are used to store meta data for the exchanged payload. Link uses these headers for both sending the request and receiving the asynchronous response.
A central header information is the correlation ID. This is used to tie the request and the response together.
Headers sent to async HTTP endpoint:
X-Link-Correlation-Id
This should be used by the callback request
X-Link-Callback-Url
The endpoint that the callback request should be sent to.
Expected headers to be returned by the callback request:
X-Link-Correlation-Id (required)
X-Link-Status (required)
Ok (the document flow will continue)
Failed (the rest of the flow is skipped)
X-Link-Document-Status (optional)
If X-Link-Status has value “Failed”, the document will be set to this status.
If the provided status is not recognized as a valid document status, it will instead be used as technical status, and the document status will be set to Failed.
X-Link-Error-Code (optional)
If X-Link-Status has value “Failed”, this error code will be used when setting the document to status “Failed”
X-Link-Error-Text (optional)
If X-Link-Status has value “Failed”, this error text will be used in the document status log when setting the document to status “Failed“
Authentication
All standard Link API authentication methods can be used. Eg. Personal Access Tokens.
The following user permissions are required to perform a callback request:
API AsyncFlow Send Callback