Get incremental changes
This endpoint returns the clockguards that have changed since the date specified in the request up to the current date.
GET /api/v1/businesses/{businessId}/clockguards/incremental?since={yyyy-MM-ddTHH:mm:ss.SSS}
If the data included in the request is correct, the response will contain the clockguards that have changed from the date specified in the since
parameter to the current date.
This parameter must be a date within the last 45 days in UTC format.
It is a paginated response, so after the first call, the response headers will contain a cursor to the next page (next
) that indicates the URL of the next incremental clockguards request.
To get the next page of data, it is necessary to make a request to that URL with the cursor:
GET /api/v1/businesses/{businessId}/clockguards/incremental?cursor=*******
It is necessary to repeat this process until the response does not contain the next
header, indicating that pagination has ended and there are no more data to show.
Example
[
{
"employeeId": "225577",
"day": "2024-07-15",
"clockGuards": [
{
"type": "WORK",
"orquestId": 249998207,
"product": "25292_HD",
"checkIn": "2024-07-15T11:00:00.000Z",
"checkOut": "2024-07-15T14:00:00.000Z",
"location": "HD",
"businessDay": "2024-07-15"
}
]
},
{
"employeeId": "222158",
"day": "2024-07-15",
"clockGuards": [
{
"type": "WORK",
"orquestId": 249998199,
"product": "25292_HD",
"checkIn": "2024-07-15T11:00:00.000Z",
"checkOut": "2024-07-15T14:00:00.000Z",
"location": "HD",
"businessDay": "2024-07-15"
},
{
"type": "WORK",
"orquestId": 249998200,
"product": "25292_HD",
"checkIn": "2024-07-15T16:30:00.000Z",
"checkOut": "2024-07-15T20:00:00.000Z",
"location": "HD",
"businessDay": "2024-07-15"
}
]
},
{
"day": "2024-07-17",
"clockGuards": []
}
]
As shown in the example, clockguards are grouped by employee and day. |
The goal of this endpoint is to allow a client to make recurring requests to keep their data updated without having to perform excessively complex update processes. Therefore, this request provides a list that shows the current state of the clockguards so that only outdated data needs to be overwritten.
Considerations
Orquest only stores the last 45 days of incremental changes. If the client does not make an incremental changes request within that time period, they will need to make a complete clockguards request.
Due to the complexity of the data, it is difficult to know if an item has changed when making bulk modifications.
This endpoint needs to be enabled in advance for the business given its computational and memory cost. |
Useful links
What is a clockguard?