Get service periods
This endpoint allows fetching the periods and service times.
GET /api/v1/businesses/{businessId}/services/{serviceId}/periods
If the data included in the request is correct —businessId and serviceId— the response will contain the following information defined for each period within the service.
Response example
[
{
"serviceTimes": [
{
"dayType": {
"name": "ALL"
},
"type": "OPEN",
"openingHours": {
"start": 0,
"end": 0
},
"serviceHours": {
"start": 540,
"end": 1260
},
"restHours": [
{
"start": 840,
"end": 900
}
]
}
],
"name": "General",
"id": "STGE",
"from": "--01-01",
"to": "--12-31",
"year": 2026
}
]
Details
-
serviceTimes: set of service times according to the day type.
-
dayType: type of day. It can be a system day type or one created at the business level.
-
name: name of the day type.
-
-
type: type of service time. It can take one of the following values:
OPEN,CLOSE,OPEN_HOLIDAY, andCLOSE_HOLIDAY. BothCLOSEandCLOSE_HOLIDAYapply to the entire day, from0to1440. -
openingHours: service opening hours. The value is expressed in minutes since midnight (00:00 local time).
-
start: start of the interval in minutes since midnight.
-
end: end of the interval in minutes since midnight.
-
-
serviceHours: hours of service to the public. The value is expressed in minutes since midnight (00:00 local time).
-
start: start of the interval in minutes since midnight.
-
end: end of the interval in minutes since midnight.
-
-
restHours: interval, if applicable, when the service will be closed. The value is expressed in minutes since midnight (00:00 local time).
-
start: start of the interval in minutes since midnight.
-
end: end of the interval in minutes since midnight.
-
-
-
name: name of the period.
-
id: external identifier of the period. Orquest defines a default one that can be manually changed through the application.
-
from: start date of the period in
--MM-DDformat. -
to: end date of the period in
--MM-DDformat. -
year: year for which the period is defined, if applicable.
The example indicates that, during the entire year 2026, for all days (ALL), the service is open 24 hours, serves the public from 09:00 to 21:00, and has a break from 14:00 to 15:00. Therefore, the effective public service hours are 09:00–14:00 and 15:00–21:00.
Considerations
If the service does not exist, the request will return a 404 Not Found error indicating not exists.
Fields expressed in minutes since midnight take into account the service time zone. For example, if the service is in UTC+2, 540 refers to 09:00 UTC+2.
If no periods are defined for the specified service, the request will return an empty array [].