Retrieve Calendars
Returns availability calendar and availability configuration for the Inventory
Overview
The Retrieve Calendars request allows access to detailed availability information and configuration settings for the Inventory. By utilizing this endpoint, the Agent can efficiently retrieve availability calendars, ensuring accurate and up-to-date Booking information for potential guests.
Endpoints Available
| Method | Endpoint | Description |
|---|---|---|
| GET | v2023.07.31/availability | Returns availability calendar and availability configuration for Inventory |
| GET | v2023.07.31/availability/{unitId} | Returns availability calendar and availability configuration for Unit in Inventory |
Path Parameters
| Path Parameter | Required / Optional | Description |
|---|---|---|
| {unitId} | Required | Unique Identifier for Unit in Inventory |
Query String Parameters
| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
| page | Optional | The page to be shown | int |
| pageSize | Optional | Limits the number of returned results | int |
| lastUpdateDate | Optional | Only return objects which have been modified after a certain date | date-time |
| mcUserId | Optional | Unique Identifier for Supplier | int |
| McUserIds | Optional | Unique Identifiers for Suppliers | array |
| unitId | Optional | Unique Identifier for Unit in Inventory | int |
| unitIds | Optional | Unique Identifier for Units in Inventory | array |
| calendarLength | Optional | The desired length of the calendar to be returned if it is available | int |
| restrictions | Optional | If present or true, will enforce gap day restrictions in the calendar | boolean |
| start | Optional | The desired start for the availability check | date-time |
| deleted | Optional | Only show properties which are deleted or not deleted. | boolean |
Restrictions ParameterThis parameter controls the type of availability data returned. Without this parameter, the endpoint will only return booked days. Including this parameter will return the units calculated availability for the specified time frame.
Response Definition
| Response Item | Description | Data Type |
|---|---|---|
"calendars" | Contains an array of calendar elements, each representing availability and booking settings for a Unit in Inventory | array |
"calendars" Object
"calendars" Object| Response Item | Description | Data Type |
|---|---|---|
"unit_id" | Unique identifier for a unit associated with the calendar data | int |
"start" | Start date and time of the calendar availability period | string |
"end" | End date and time of the calendar availability period | string |
"availability" | A string representing the availability of a unit for each day in the calendar period | string |
"min_days_between_departure_and_arrival" | Minimum number of days required between the departure date and the arrival date for the unit | int |
"min_days_between_booking_and_arrival" | Minimum number of days required between the booking date and the arrival date | int |
"stay_arrival_min_nights_default" | The default minimum number of nights allowed for a guest stay upon arrival | int |
"mc_user_id" | Unique identifier for the Supplier associated with the unit and calendar data | int |
Sample Request
curl --request GET \
--url 'https://api.ciiruspartners.com/v2023.07.31/availability?page=1&pageSize=50'Sample Response
{
"calendars": [
{
"unit_id": 219266,
"start": "2023-07-25T16:00:00+00:00",
"end": "2026-07-24T10:00:00+00:00",
"availability": "AAAAAAAAAAAAAAAAAABBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"min_days_between_departure_and_arrival": 0,
"min_days_between_booking_and_arrival": 2,
"stay_arrival_min_nights_default": 7,
"mc_user_id": 42330
},
...
],
"next_page_url": "https://api.ciiruspartners.com/v20230731/availability?page=2&pageSize=1",
"total_page_count": 3Currently only 'A', 'B', 'F', 'G', and 'M' are supported
A Available B Calendar Booking D Arrival Days E Departure Days F Booking Fence G Calendar Booking Gap Day g Gap Days When Placing A Booking M Minimum or Maximum Nights The gap day restrictions will only be shown if the query parameter 'restrictions' is passed 'true'
Updated 3 months ago
