Skip to main content

Get available time slots

Method GET

https://my.easyweek.io/api/public/v2/locations/{location_uuid}/time-slots

Description: This endpoint retrieves available time slots for appointments at a specific location, given the selected service and staff member within a specified date range. It provides detailed information about each date, including available slots with start and end times, the quantity available for booking, and pricing details, as well as any booking intervals that might exist.

Example Request

curl -i -X GET \
https://my.easyweek.io/api/public/v2/locations/{location_uuid}/time-slots/?service_uuid={service_uuid}&staffer_uuid={staffer_uuid}&range_start={range_start}&range_end={range_end}&timezone={timezone} \
-H 'Authorization: Bearer <YOUR_SECRET>' \
-H 'Workspace: <YOUR_WORKSPACE>'

Path Parameters

  • location_uuid (string, required): This parameter is the unique identifier of the location for which available time slots are being requested. It is used to specify the location by its UUID.

Query Parameters

  • service_uuid (string, required): A required parameter that specifies the UUID of the service for which the appointment slots are needed.
  • staffer_uuid (string, optional): A required parameter that represents the UUID of the staff member for whom the appointment time slots are requested.
  • range_start (string, required): This parameter defines the start date of the range from which you want to retrieve available time slots.
  • range_end (string, required): This parameter sets the end date of the range for the time slot query.
  • timezone (string, optional): Represents the timezone identifier for the client's local timezone. Used to adjust the time slots to the client's local time.

The response includes the current date (today), the time zone for the location (timezone), and an array of dates each with its own array of available time slots (slots) and intervals during which bookings can be made (intervals). Each slot object includes a start and end time and the price information with the amount, formatted price, and currency. Intervals denote chunks of time during the day when time slots can be booked.

Example Response

{
"today": "2023-12-20",
"timezone": "Europe/Berlin",
"currency": "EUR",
"dates": [
{
"date": "2023-12-20",
"slots": [
{
"start": "09:00",
"start_formatted": 32400,
"end": "09:30",
"end_formatted": 34200,
"quantity": 1,
"price": 10000,
"price_formatted": "€100.00"
}
],
"intervals": [
{
"start": "09:00",
"start_formatted": 32400,
"end": "12:00",
"end_formatted": 43200
}
]
}
]
}