Get Customers

The following endpoint can be used to retrieve the details of Customers within the CoCard - Mile Two application.


Endpoint

The following endpoint can be used to retrieve Customers. You must replace the {base_url} , {site_id} and {updated_after} variables with the appropriate values.

GET
{base_url}/api/v3.1/site/{site_id}/customers?updated_after={updated_after}

Request Query Parameters
Field
Type
Description
updated_after
Date
A timestamp to be used as the start of the date range (exclusive) of the query. On subsequent requests, you should pass in the next_updated_after value that was in the response of the previous request. Queries look back a maximum of 7 days. A timestamp older than that is moved forward to the limit rather than rejected, so records that last changed before it are not returned. An integration that sends back the next_updated_after of each response never reaches the limit. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
Response
Field
Type
Description
records_matched
Number
The number of records that matched the query parameters.
records_returned
Number
The number of records that were returned.
next_updated_after
Date
A timestamp to be used as the start of the date range (exclusive) of the next query for the same endpoint. This is used for pagination when querying with an updated_after parameter. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
query_time
Date
The time the query ran. next_updated_after is derived from it, so it is the same value whenever a full page was returned. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
limit
Number
The maximum number of records a single response will return. When records_returned equals this, more records are likely waiting and another request should be made with the returned next_updated_after.
records
The list of contacts that matched the query parameters.
success
Boolean
Whether the query completed successfully.