Skip to content

Async Invocation

Standard, synchronous invocation of List methods may time out for larger data sets. In order to support these larger data sets, the API collections which may encounter this problem allow for asynchronous invocation. Those API collections which do support asynchronous invocation are documented below in each collection under the List method documentation.

In order to invoke the asynchronous List method, add the follow url suffix after the base method for the particular collection:

http
POST {base_url}/async?{query_parameters}

For example, to list punches, base_url would be /punches.

This POST call should return HTTP status 202, with a response body in the following format:

json
{ "success": true, "reportKey": "{REPORT_KEY}" }

Using the REPORT_KEY, you may then poll for the results at:

http
GET {base_url}/async/{REPORT_KEY}/poll

If poll returns HTTP status 202, that means the server is still processing the result, and you should try again later. When poll returns HTTP status 200, then the report is complete, and the response body will contain the result.

You should not poll more frequently than once every 10 seconds. Each poll call does count toward throttle.

Fareclock API Documentation