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
| Name | Type | Description |
|---|---|---|
| timestamp | Datetime | Start |
| timestamp_end | Datetime | End |
| formatted_timestamp | String | Localised human readable format |
| formatted_timestamp_end | String | Localised human readable format |
| free | Integer | Free capacity |
| available_resources | Array | Ids of resources with availability |
| maximum_capacity | Integer | The 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
| Name | Type | Description |
|---|---|---|
| from | Date | Default: today |
| to | Date | Default: today |
| selected_resources | Array | Default: all active providers. |
Next available date
GET /services/{service_id}/next_available_date will return the next available date within 30 days with a free slot.
Response
[
{
"available_date": "2016-02-20"
}
]
Query Parameters
| Name | Type | Description |
|---|---|---|
| from | Date | Default: today. |
| selected_resources | Array | Default: 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
| Name | Type | Description |
|---|---|---|
| from | Date | Default: today. |
| to | Date | Default: rest of the month. |
| selected_resources | Array | Default: all active providers. |