Get employee allocations

This endpoint retrieves the service associations of an employee.

GET /api/v1/businesses/{businessId}/employees/{employeeId}/employee-allocations?from={yyyy-MM-dd}&to={yyyy-MM-dd}

If the data included in the request is correct —both the businessId and the employeeId— the response will contain the list of service associations and cessions for the identified employee:

[
    {
        "from": "2021-10-01",
        "to": "2024-10-01",
        "ownerProduct": "0001-G",
        "product": "0001-G",
        "regularCessions": [
            {
                "daysOfWeek": [
                    "MONDAY"
                ],
                "product": "081818",
                "minutes": 360
            }
        ]
    }
]

In the example provided, the employee has a service association (product 0001-G) from 2021-10-01 to 2024-10-01. Additionally, there is a regular cession (product 081818) of six hours on Mondays.

Considerations

If the employee identifier specified in the URL does not exist in the business, the request will return a 404 Not Found error, indicating not exits.

If the employee has no service associations for the specified period, the request will return an empty array [].