Skip to content

Service Available Times

GET
/businesses/{businessId}/services/{serviceId}/availableTimes

Retrieve available times for a service

startDate
required
string format: date-time

The start date of the range to retrieve available times for (ISO 8601 format).

endDate
required
string format: date-time

The end date of the range to retrieve available times for (ISO 8601 format).

duration
required
integer

The duration of the service in minutes.

staffIds
Array<string>

The staff members to filter the available times by.

includeUnavailableSlots
boolean

If true, unavailable slots will be included in the response.

The available times for this service

Media typeapplication/json
object
data

The bookable times for a given filter.

Array<object>
object
time

The start time of the time slot. ISO 8601 format.

string
staffs
Array<object>
object
id

The ID of the Staff Member

string format: uuid
availableSlots

The number of available slots for this time slot.

number

Example

{
"data": [
{
"time": "2022-07-01T10:00:00.000Z"
}
]
}

A required query parameter is missing, or the service ID is malformed.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: BadRequestError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 400,
"type": "BadRequestError",
"title": "startDate parameter is required"
}
}

The API key is missing or invalid, or the Business cannot be accessed with it.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: UnauthorizedError BusinessArchivedError BusinessDisabledError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 403,
"type": "UnauthorizedError",
"title": "Invalid API token"
}
}

The Business does not exist.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: NotFoundError BusinessNotFoundError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 404,
"type": "BusinessNotFoundError",
"title": "Business not found"
}
}