Get needs summary by service
This endpoint returns the summary of the needs of a service for a specific day.
GET /api/v1/businesses/{businessId}/services/{serviceId}/needs/summary/{yyyy-MM-dd}
In the request URL, the following parameters must be specified:
-
Business identifier (businessId).
-
Service or store identifier (serviceId).
-
Date for which the query is made
yyyy-MM-dd
.
If the data included in the request URL is correct, the response will contain the needs of the service with all the defined information for them.
Below are some examples (response fragments):
[
{
"location": "Closing Manager",
"locationId": "CLOSING_MAN",
"locationType": "VARIABLE",
"product": "0001-G",
"service": "0001",
"timeSlots": [
{
"from": "2024-07-22T21:30:00.000Z",
"to": "2024-07-22T21:45:00.000Z",
"applied": 1,
"real": 1,
"reference": 1
},
{
"from": "2024-07-22T21:45:00.000Z",
"to": "2024-07-22T22:00:00.000Z",
"applied": 1,
"real": 1,
"reference": 1
}
]
}
]
[
{
"location": "SALES",
"locationId": "03",
"locationType": "VARIABLE",
"product": "0001-G",
"service": "0001",
"timeSlots": [
{
"from": "2024-07-19T08:00:00.000Z",
"to": "2024-07-19T08:15:00.000Z",
"real": 5
},
{
"from": "2024-07-19T08:15:00.000Z",
"to": "2024-07-19T08:30:00.000Z",
"real": 5
}
]
},
{
"location": "FITTING ROOMS",
"locationId": "06",
"locationType": "VARIABLE",
"product": "0001-G",
"service": "0001",
"timeSlots": [
{
"from": "2024-07-19T07:00:00.000Z",
"to": "2024-07-19T07:15:00.000Z",
"real": 2
},
{
"from": "2024-07-19T07:15:00.000Z",
"to": "2024-07-19T07:30:00.000Z",
"real": 2
}
]
}
]
As shown in the examples, the response will depend on the business configuration and how the needs have been generated (manually, integration, etc.).
Considerations
The time slots indicate the time period in UTC, that is, the time zone configured for the service is not considered.
If the service specified in the URL does not exist in the business, the request will return a 404 Not Found
error, with the message not exists.
If there are no needs generated for the date specified in the URL, the request will return a 204 No Content
status.
Useful links
What are needs?
What is the structure of the needs summary?