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.

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 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.

What is an assignment?

What is the assignments summary?

What is a task?