Get clockguards by product
|
Deprecated endpoint. It is recommended to migrate to the new version available here. |
Deprecated content
This endpoint returns the consolidated clockguards made on a product within a specific period not exceeding 30 days.
GET /api/v1/business/{businessId}/product/{productId}/clockguards/from/{yyyy-MM-dd}/to/{yyyy-MM-dd}
If the data included in the request is correct —both the businessId and the productId—, the response will contain the list of clockguards for the product with all the defined information for them.
The data included in the response will depend on the information that has been previously associated with the record.
Below are some examples:
Response examples
Records with all possible information, including data on the task where the record was made.
[
{
"employeeId": "1006351",
"location": {
"color": "#5fe7d5",
"description": "Daily truck unloading",
"name": "UNLOADING",
"shortName": "TD",
"requiredLevel": 3,
"priority": 5,
"maxResources": 2,
"type": "FIXED",
"shouldAvoidOvercover": true,
"system": false,
"category": "OPERATIVE",
"product": "0001-G",
"id": "8",
"zone": "General"
},
"type": "WORK",
"checkIn": "2024-05-10T07:00:00.000Z",
"checkOut": "2024-05-10T09:00:00.000Z",
"orquestId": 220030403
},
{
"employeeId": "1006351",
"location": {
"color": "#5fe7d5",
"description": "Daily truck unloading",
"name": "UNLOADING",
"shortName": "TD",
"requiredLevel": 3,
"priority": 5,
"maxResources": 2,
"type": "FIXED",
"shouldAvoidOvercover": true,
"system": false,
"category": "OPERATIVE",
"product": "0001-G",
"id": "8",
"zone": "General"
},
"type": "WORK",
"checkIn": "2024-05-13T07:00:00.000Z",
"checkOut": "2024-05-13T09:00:00.000Z",
"orquestId": 220030404
}
]
Records with only the basic information.
[
{
"employeeId": "1006350",
"type": "WORK",
"checkIn": "2024-05-10T07:00:00.000Z",
"checkOut": "2024-05-10T12:00:00.000Z",
"orquestId": 220030406
},
{
"employeeId": "1006350",
"type": "REST",
"checkIn": "2024-05-10T10:00:00.000Z",
"checkOut": "2024-05-10T10:30:00.000Z",
"orquestId": 220030407
},
{
"employeeId": "1006350",
"type": "WORK",
"checkIn": "2024-05-13T07:00:00.000Z",
"checkOut": "2024-05-13T12:00:00.000Z",
"orquestId": 220030408
}
]
If there are errors in the record, for example, the same type of clockguard (IN), the API returns the data as it was registered:
[
{
"employeeId": "1006350",
"type": "WORK",
"checkIn": "2024-05-14T07:00:00.000Z",
"orquestId": 220030409
},
{
"employeeId": "1006350",
"type": "WORK",
"checkIn": "2024-05-14T12:00:00.000Z",
"orquestId": 220030410
}
]
Details
-
employeeId: external identifier of the employee.
-
location: information about the task linked to the clockguard, present only if the record was made with a task. Contains the following fields:
-
color: color configured in Orquest for the task.
-
description: description of the task defined in Orquest.
-
name: name of the task in Orquest.
-
shortName: task abbreviation in Orquest.
-
requiredLevel: skill level required to perform the task. Ranges from
0(no training needed) to3(maximum training level) and must be previously configured in Orquest. -
priority: priority of task coverage. Ranges from
0(low) to5(high) and must be previously configured in Orquest. -
maxResources: limit of people for the task.
-
type: type of task, whether it is fixed, variable, or non-plannable (
FIXED,VARIABLE,NON_PLANIFIABLE). -
shouldAvoidOvercover: if this parameter is
true, the task will not be overcovered. -
system: determines if the task was created by the system (
true) or by the user (false). -
category: category of the task previously configured in Orquest.
-
product: external identifier of the product or section.
-
id: external identifier of the task.
-
metadata: any additional data that has been previously configured for the task in Orquest. The metadata structure must be previously configured.
-
zone: physical place in the service (store, restaurant, etc.) where the location is carried out.
-
type: activity type of the clockguard (
WORK,REST,OTHER). -
checkIn: entry date and time in UTC (
yyyy-MM-ddTHH:mm:ss.SSSZ). -
latIn: entry latitude.
-
lonIn: entry longitude.
-
deviceIn: identifier of the clockguard device at check-in.
-
checkOut: exit date and time in UTC (
yyyy-MM-ddTHH:mm:ss.SSSZ). -
latOut: exit latitude.
-
lonOut: exit longitude.
-
deviceOut: identifier of the clockguard device at check-out.
-
comment: last comment associated with the clockguard, if applicable.
-
orquestId: internal identifier of the clockguard in Orquest.
As shown in the examples, the request returns the data as it was registered, so the level of detail in the response will depend on the data previously sent: for example, if the registration includes the clockguard device identifier (device), the request will also return that information linked to the record.
Considerations
This request returns only consolidated clockguards.
The API returns the data in the order of registration, in UTC and in yyyy-MM-ddTHH:mm:ss.SSSZ format.
The response will contain the data up to the date specified in the to parameter, excluding the data of that day.
For example, if clockguards are queried up to 2024-05-14, the data for the 14th will not appear in the response.
The maximum allowed interval for the query is 30 days.
If the period indicated in the URL is longer, the request will return a 406 Not Acceptable error.
If there is no data for that period, the request will return an empty array [].
If the product specified in the URL does not exist in the business, the request will return a 404 Not Found error indicating not exists.
Useful links
What is a clockguard?