Get current service associations
This endpoint returns the current service associations of a service.
GET /api/v1/businesses/{businessId}/services/{serviceId}/service-associations/current
If the data in the request is correct —both businessId and serviceId— the response will contain all service associations with a start date before the current date and an end date after the current date (or not set).
Below is a snippet of the response:
[
{
"ownerProduct": "0001-G",
"product": "0001-G",
"from": "2021-06-25",
"splitPresence": true,
"unplannable": false,
"employeeId": "152015",
"service": "0001"
},
{
"ownerProduct": "0001-G",
"product": "0001-G",
"from": "2021-06-25",
"splitPresence": true,
"unplannable": false,
"employeeId": "1006357",
"service": "0001"
},
{
"ownerProduct": "0001-G",
"product": "0002",
"from": "2024-10-08",
"to": "2024-10-15",
"splitPresence": false,
"unplannable": false,
"employeeId": "152015",
"service": "0002"
}
]
Considerations
The request will return all service associations and cessions where the ownerProduct matches the products of the service specified in the URL.
Regular cessions do not appear in the response.
Employees without an external identifier (employeeId) configured in the system will not appear in the response.
If there are no current service associations, the request will return an empty array []
.
If the service indicated in the URL does not exist within the business, the request will return a 404 Not Found
error, specifying in the message not exits.
Useful links
What is a service association? And what is a cession?