Skip to content

Latest commit

 

History

History
109 lines (86 loc) · 3.31 KB

File metadata and controls

109 lines (86 loc) · 3.31 KB
title Slots
nav_order 1
description API reference for the Makeplans slots endpoint — available times computed from resources, services and opening hours.

Slots are not physical objects in Makeplans. It is a virtual representation of available times based on attributes from resources and services as well as various settings. So if a resource is open 8am to 4pm and selected service has interval of 60 minutes, slots will return an array of all time intervals (8am-9am, 9am-10am etc.) and indicate which resources are available.

Slots are meant for listing available times on the Makeplans booking page. You can however make bookings at any time and with any length - as long as the resource is available of course.

Attributes

NameTypeDescription
timestampDatetimeStart
timestamp_endDatetimeEnd
formatted_timestampStringLocalised human readable format
formatted_timestamp_endStringLocalised human readable format
freeIntegerFree capacity
available_resourcesArrayIds of resources with availability
maximum_capacityIntegerThe maximum capacity of the available resources

Listing

GET /services/{service_id}/slots will return slots for specified service.

Response

[
  {
    "slot": {
      "timestamp": "2013-03-08T10:00:00+00:00",
      "timestamp_end": "2013-03-08T10:15:00+00:00",
      "formatted_timestamp": "Friday, March  8, 2013, 10:00 AM",
      "formatted_timestamp_end": "Friday, March  8, 2013, 10:15 AM",
      "free": 1,
      "available_resources": [
        1,2
      ],
      "maximum_capacity": 2
    }
  }
]

Query Parameters

NameTypeDescription
fromDateDefault: today
toDateDefault: same as from
selected_resourcesArrayDefault: all active providers.

Dates in the past are ignored and replaced with today. Slots are only generated for today and future dates.

Next available date

GET /services/{service_id}/next_available_date will return the next available date within 90 days with a free slot.

Response

[
  {
    "available_date": "2016-02-20"
  }
]

Query Parameters

NameTypeDescription
fromDateDefault: today.
selected_resourcesArrayDefault: all active providers.

Available dates

GET /services/{service_id}/available_dates will return the available dates for the rest of the current month.

Response

[
  {
    "available_date": {
      "date": "2021-04-01"
    }
  },
  {
    "available_date": {
      "date": "2021-04-04"
    }
  }
]

Query Parameters

NameTypeDescription
fromDateDefault: today.
toDateDefault: rest of the month.
selected_resourcesArrayDefault: all active providers.