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

MethodEndpointDescription
POSTv2023.07.31/availabilityReturns results for checking date range availability for Inventory
POSTv2023.07.31/availability/{unitId}Returns results for checking date range availability for a Unit in Inventory

Path Parameters

Path ParameterRequired / OptionalDescription
{unitId}RequiredUnique Identifier for Unit in Inventory

Query String Parameters

ParameterRequired / OptionalDescriptionData Type
pageOptionalThe page to be shownint
pageSizeOptionalLimits the number of returned resultsint
lastUpdateDateOptionalOnly return objects which have been modified after a certain datedate-time
mcUserIdOptionalUnique Identifier for Supplierint
mcUserIdsOptionalUnique Identifiers for Suppliersarray
unitIdOptionalUnique Identifier for Unit in Inventoryint
unitIdsOptionalUnique Identifier for Units in Inventoryarray
isAvailableOptionalFilter by only those which are available or notboolean

Body Parameters

ParameterRequired / OptionalDescriptionData Type
"start"RequiredStart Date of specified Date Rangedate-time
"end"RequiredEnd Date of specified Date Rangedate-time

Response Definition

Response ItemDescriptionData 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

Response ItemDescriptionData Type
"unit_id"Unique identifier for the Unit associated with the availability dataint
"start"Start date and time of the availability periodstring
"end"End date and time of the availability periodstring
"is_available"Indicates whether the Unit is available (true) or not available (false) within the specified date rangeboolean
"availability"A string representing the daily availability status for the Unit within the date rangestring
"length"The total length (in days) of the availability periodint
"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 dataint

"settings" Object

Response ItemDescriptionData Type
"yyyy-mm-ddT00:00:00"This object represents the availability and stay restrictions for the specific dateobject
"ArrivalDays"An array specifying the days of the week on which guests are allowed to arrivearray
"DepartureDays"An array specifying the days of the week on which guests are allowed to departarray
"BookingFence"The booking fence represents the number of days ahead of the current date beyond which guests are not allowed to bookint
"GapDays"Gap days refer to the number of days required between consecutive bookings for this Unitint
"MinimumNightStay"The minimum number of nights required for a bookingint
"MaximumNightStay"The maximum number of nights allowed for a bookingint

📘

"ArrivalDays" or "DepartureDays" Array

Each 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": 2