Get service times

This endpoint allows to query the service times applied to a service according to the day type.

GET /api/v1/businesses/{businessId}/services/{serviceId}/servicetimes/from/{yyyy-MM-dd}/to/{yyyy-MM-dd}

If the data included in the request is correct —businessId and serviceId—, the response will contain the service times applied to a service during the specified date range.

Response example

To query the service times applied to the service between 2024-09-22 and 2024-09-24, make the following request:

GET /api/v1/businesses/BUSINESSID/services/SERVICEID/servicetimes/from/2024-09-22/to/2024-09-24

The response received is as follows:

[
    {
        "date": "2024-09-22",
        "dayType": "SUNDAY",
        "openingMinute": 0,
        "closingMinute": 1440,
        "serviceStartMinute": 0,
        "serviceEndMinute": 1440,
        "restStartMinute": 0,
        "restEndMinute": 0,
        "type": "close"
    },
    {
        "date": "2024-09-23",
        "dayType": "ALL",
        "openingMinute": 0,
        "closingMinute": 1440,
        "serviceStartMinute": 540,
        "serviceEndMinute": 1260,
        "restStartMinute": 0,
        "restEndMinute": 0,
        "type": "open"
    },
    {
        "date": "2024-09-24",
        "dayType": "ALL",
        "openingMinute": 0,
        "closingMinute": 1440,
        "serviceStartMinute": 540,
        "serviceEndMinute": 1260,
        "restStartMinute": 0,
        "restEndMinute": 0,
        "type": "open"
    }
]
Details
  • date: the date corresponding to the service time.

  • dayType: the type of day applied. It can be a system day type or one created at the business level.

  • openingMinute: the minute of the day when the service opens. The value is expressed in minutes from midnight (00:00 local time).

  • closingMinute: the minute of the day when the service closes. The value is expressed in minutes from midnight (00:00 local time).

  • serviceStartMinute: the minute of the day when public service hours start. The value is expressed in minutes from midnight (00:00 local time).

  • serviceEndMinute: the minute of the day when public service hours end. The value is expressed in minutes from midnight (00:00 local time).

  • restStartMinute: the minute of the day when the service’s break period begins. If there is no break period, this value will be 0.

  • restEndMinute: the minute of the day when the service’s break period ends. If there is no break period, this value will be 0.

  • type: the type of service time. It can take one of the following values: open, close, open_holiday and close_holiday. Both close and close_holiday apply to the entire day, i.e., from 0 to 1440 minutes.

  • Day 22: close type applies to the entire day, from 00:00 (0 minutes) to 24:00 (1440 minutes).

  • Days 23 and 24: open type with work hours from 00:00 (0 minutes) to 24:00 (1440 minutes) and public service hours from 9:00 (540 minutes) to 21:00 (1260 minutes).

Considerations

Fields that consider minutes from midnight (openingMinute, closingMinute, serviceStartMinute, serviceEndMinute, restStartMinute, restEndMinute) take into account the service’s time zone. For example, if the service is in UTC+2, 540 minutes refers to 9:00 UTC+2.

Error codes

This endpoint does not return any error codes of its own beyond those described in common errors.

What is a service?

What is a service time?

What is a day type?