Get assignments summary by service
This endpoint returns the assignments summary of a service for a specific day.
GET /api/v1/businesses/{businessId}/services/{serviceId}/assignments/summary/{yyyy-MM-dd}
If the data included in the request is correct —both the businessId and the serviceId— the response will contain the number of people assigned for each task on the specified day.
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
}
],
"zone": "General"
},
{
"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
}
],
"zone": "General"
}
]
Details
-
location: task name.
-
locationId: external task identifier.
-
product: external product or section identifier.
-
service: external service or store identifier.
-
timeSlots: time slots indicating how long employees are needed for the task. Each time slot is 15 minutes long and contains the following fields:
-
from: start of the time slot in UTC.
-
to: end of the time slot in UTC.
-
total: number of employees assigned to the time slot.
-
-
zone: physical place in the service (store, restaurant, etc.) where the location is carried out.
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 the service has multiple products or sections, the response will contain the tasks for all of them.
If there are no assignments for the specified day, the request will return 204 No Content.
If the service 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.
Useful links
What is an assignment?
What is a task?