List Credits

Use this to catch up on every credit that changed since your last sync.

The following endpoint can be used to retrieve the details of Credits within the Hyfin application.


Endpoint

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

GET
{base_url}/api/v4/site/{site_id}/credits?updated_after={updated_after}

Request Query Parameters
Field
Type
Description
updated_after
The start of the query's time range (exclusive). On later requests, send the nextUpdatedAfter from the previous response. Unlike other timestamps, it needs exactly three digits of milliseconds and a time zone, either Z or an offset such as +05:00. In a query string, send + as %2B. Any other format, or a time in the future, is rejected. 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. Omitting this parameter returns the last 7 days. An integration that sends back the nextUpdatedAfter of each response never reaches the limit. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
Response
Field
Type
Description
recordsMatched
Number
The number of records that matched the query parameters.
recordsReturned
Number
The number of records that were returned.
nextUpdatedAfter
The value to send as updated_after on the next query. When more records matched than this page returned, it is 1 millisecond before the last record's update time, so that record comes back again on the next page: de-duplicate by id. When this page returned every matching record, it is the query time, and the next query returns only records changed since. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
queryTime
The time the query ran. When the page returned every matching record it is also the nextUpdatedAfter. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
limit
Number
The maximum number of records a single response will return. When recordsReturned equals this, more records are likely waiting and another request should be made with the returned nextUpdatedAfter.
records
The records that matched the query parameters, oldest update first.
success
Boolean
Whether the query completed successfully.