Get assignments summary by product
This endpoint returns the assignments summary of a product for a specific day.
GET /api/v1/businesses/{businessId}/products/{productId}/assignments/summary/{yyyy-MM-dd}
If the data included in the request is correct —both the businessId and the productId— the response will contain the number of people assigned for each task on the specified day.
Below is a fragment of a response example:
[
{
"location": "UNLOADING",
"locationId": "08",
"product": "0001-G",
"service": "0001",
"timeSlots": [
{
"from": "2024-09-16T06:45:00.000Z",
"to": "2024-09-16T07:00:00.000Z",
"total": 2
},
{
"from": "2024-09-16T07:00:00.000Z",
"to": "2024-09-16T07:15:00.000Z",
"total": 2
},
{
"from": "2024-09-16T07:15:00.000Z",
"to": "2024-09-16T07:30:00.000Z",
"total": 2
},
{
"from": "2024-09-16T07:30:00.000Z",
"to": "2024-09-16T07:45:00.000Z",
"total": 2
}
]
},
{
"location": "OPENING",
"locationId": "01",
"product": "0001-G",
"service": "0001",
"timeSlots": [
{
"from": "2024-09-16T07:00:00.000Z",
"to": "2024-09-16T07:15:00.000Z",
"total": 1
},
{
"from": "2024-09-16T07:15:00.000Z",
"to": "2024-09-16T07:30:00.000Z",
"total": 1
},
{
"from": "2024-09-16T07:30:00.000Z",
"to": "2024-09-16T07:45:00.000Z",
"total": 1
},
{
"from": "2024-09-16T07:45:00.000Z",
"to": "2024-09-16T08:00:00.000Z",
"total": 1
}
]
}
]
For each task in the example (UNLOADING
and OPENING
), the time ranges are specified in 15-minute intervals along with the number of employees needed in each of those intervals.
Considerations
If there are no assignments for the specified day, the request will return 204 No Content
.
If the product indicated in the URL does not exist in the business, the request will return a 404 Not Found
error, specifying in the message not exists.