Asynchronous Calls (Background Processes)

The FrankieOne API will allow both synchronous and asynchronous processes to run in many operations. The choice can be made on a request-by-request basis too.

By default, all functions are synchronous (with some exceptions, see Note below). However, where appropriate you can set a header flag:

X-Frankie-Background: 1

This will indicate to the function that you wish to operate asynchronously. This is not available for all functions (such as GET functions), so check the specific documentation to be sure.

📘

Note:

Some functions, such as the /business queries, are always asynchronous. See the API documentation for each call for details.

Call Flow

(1) If the background flag is set on a function that supports it (simple add and GET functions do not - see the individual function calls for details), then the service will perform a brief validation of the data sent through.

401

Asych_flow.png

(2) If there is enough to perform the function, and it passes basic validation checks, then the service will respond with an HTTP 202 ACCEPT response.

This response will contain the RequestID, entity/documentID, checkID (if a check is being requested), and a link to the portal if appropriate.

(3) The service will then proceed to process the request and once complete it will place a FUNCTION result notification on the queue

(4) The FrankieOne notification service will push a webhook notification to you. This webhook is defined in FrankieOne's configuration. Please contact developer support for assistance.

The webhook payload will contain the original requestID and a simple precis of the final disposition of the request.

(6) You then call the /retrieve API and

(7) download the result of the call.

The response will contain 2 elements:

The original HTTP response - which is what would have been returned if the call had been made synchronously.

The response payload - This will be the result object that matches up to the function call and the HTTP response.

So if the original HTTP response is a non-200 value, then the payload will be a standard FrankieOne Error Object. See Error Codes for more on error codes and messages.

If the response code is 200, then the payload will match up to the originally requested function's successful result payload.