Retrieve Availability
Returns results for checking date range availability of the Inventory
Overview
The Retrieve Availability request allows the Agent to efficiently check the availability of the Inventory within a specific date range. This endpoint provides real-time access to availability information, enabling your application to respond promptly to guest inquiries and optimize booking operations.
Endpoints Available
| Method | Endpoint | Description |
|---|---|---|
| POST | v2023.07.31/availability | Returns results for checking date range availability for Inventory |
| POST | v2023.07.31/availability/{unitId} | Returns results for checking date range availability for a 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 |
| isAvailable | Optional | Filter by only those which are available or not | boolean |
Body Parameters
| Parameter | Required / Optional | Description | Data Type |
|---|---|---|---|
"start" | Required | Start Date of specified Date Range | date-time |
"end" | Required | End Date of specified Date Range | date-time |
Response Definition
| Response Item | Description | Data Type |
|---|---|---|
"availability" | Contains an array of availability objects, each representing the availability settings for a specific Unit within a certain date range. | array |
"availability" Object
"availability" Object| Response Item | Description | Data Type |
|---|---|---|
"unit_id" | Unique identifier for the Unit associated with the availability data | int |
"start" | Start date and time of the availability period | string |
"end" | End date and time of the availability period | string |
"is_available" | Indicates whether the Unit is available (true) or not available (false) within the specified date range | boolean |
"availability" | A string representing the daily availability status for the Unit within the date range | string |
"length" | The total length (in days) of the availability period | int |
"settings" | Contains various settings related to the Unit's availability (One "settings" object per date of the availability period) | object |
"reason" | A reason indicating why "is_avaiable" returned "false" | string |
"mc_user_id" | The unique identifier of the Supplier associated with the availability data | int |
"settings" Object
"settings" Object| Response Item | Description | Data Type |
|---|---|---|
"yyyy-mm-ddT00:00:00" | This object represents the availability and stay restrictions for the specific date | object |
"ArrivalDays" | An array specifying the days of the week on which guests are allowed to arrive | array |
"DepartureDays" | An array specifying the days of the week on which guests are allowed to depart | array |
"BookingFence" | The booking fence represents the number of days ahead of the current date beyond which guests are not allowed to book | int |
"GapDays" | Gap days refer to the number of days required between consecutive bookings for this Unit | int |
"MinimumNightStay" | The minimum number of nights required for a booking | int |
"MaximumNightStay" | The maximum number of nights allowed for a booking | int |
"ArrivalDays"or"DepartureDays"ArrayEach element in the array corresponds to a day of the week, represented as an integer, where 1 indicates Monday, 2 indicates Tuesday, and so on, up to 6 for Saturday, and 0 for Sunday.
Sample Request
curl --request POST \
--url 'https://api.ciiruspartners.com/v2023.07.31/availability?page=1&pageSize=50'
--data '
{
"start": "2023-07-31",
"end": "2023-08-08"
}
'Sample Response
{
"availability": [
{
"unit_id": 219264,
"start": "2023-07-31T16:00:00",
"end": "2023-08-08T10:00:00",
"is_available": false,
"availability": "ABBBAABB",
"length": 8,
"settings": {
"2023-07-31T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-01T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-02T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-03T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-04T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-05T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-06T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
},
"2023-08-07T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 4,
"MaximumNightStay": 32767
}
},
"reason": "calendar bookings not respected",
"mc_user_id": 42330
},
{
"unit_id": 222003,
"start": "2023-07-31T16:00:00",
"end": "2023-08-08T10:00:00",
"is_available": true,
"availability": "AAAAAAAA",
"length": 8,
"settings": {
"2023-07-31T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-01T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-02T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-03T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-04T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-05T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-06T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
},
"2023-08-07T00:00:00": {
"ArrivalDays": [
1,
2,
3,
4,
5,
6,
0
],
"DepartureDays": [
1,
2,
3,
4,
5,
6,
0
],
"BookingFence": 0,
"GapDays": 0,
"MinimumNightStay": 2,
"MaximumNightStay": 32767
}
},
"mc_user_id": 42330
},
...
],
"next_page_url": "https://api.ciiruspartners.com/v20230731/availability?page=2&pageSize=5",
"total_page_count": 2Updated 3 months ago
