GET AVAILABILITY
GetAvailability() returns the availability for a unit and date range. Availability is defined as a unit having not being rented, occupied or under repair and that is ready to be rented to guests. The start_date, end_date and the dates in between are dates of stay, not the check_in and check_out dates of a possible itinerary. Use GetQuote() to get availability for an itinerary.
Note: Once the advertiser has organized the units into unit_groups, units will no longer be accessible.
End Point
https://www.availabilityexchange.com/gateway/getavailability
Parameters
business_id
(64-bit integer)
unique id of the business.
unit_id
(32-bit integer)
unique id of the unit. More than one id can be specified
unit_group_id
(32-bit integer)
unique id of the unit group. At most one of unit_id and unit_group_id can be specified. If both are omitted, the availability will be presented in the default configuration for the property, depending on whether or not they have unit groups set up
start_date
(date YYYY-MM-dd)
the first date requested
end_date
(date YYYY-MM-dd)
the last date requested
>curl
--user username:passkey
--url https://www.availabilityexchange.com/gateway/getavailability?business_id=16609&unit_group_id=17800&start_date=2023-09-20&end_date=2023-09-22
response_errors
(See Response Errors)
business_id (64-bit integer)
the unique identifier for this business
children_allowed (boolean)
true if children are allowed as guests at the property
age_considered_child (32-bit integer)
a guest is considered a child at this year of age or below
children_included_in_occupancy (boolean)
if true, children are counted toward the maximum occupancy of the unit
availability
(list of objects)
Availability Object:
unit_id (32-bit integer)
the unique identifier for the unit. This will be omitted if the request was not sent with a unit_id
unit_group_id (32-bit integer)
the unique identifier for the unit group. This will be omitted if the request was not sent with a unit_group_id
capacity (32-bit integer)
the total number of people a unit can hold, including adults and children
max_children (32-bit integer)
maximum number of children that are allowed for the unit / unit group
query_start (date YYYY-MM-dd)
the first date returned
query_end (date YYYY-MM-dd)
the last date returned
availability (string)
comma separated list for each date. If called with a
unit_id, this string will be 0 for each day the unit is occupied, 1 for available. If called with a unit_group_id, the string will contain the number of units in that unit group available per date in the range requested.
{
"business_id": 16609,
"children_allowed": true,
"age_considered_child": 12,
"children_included_in_occupancy": true,
"availability": [
{
"unit_group_id": 23611,
"number_of_units": 10,
"capacity": 4,
"max_children": 2,
"query_start": "2024-02-10",
"query_end": "2024-02-14",
"availability": "4,4,4,4,4",
"response_errors": []
}
],
"response_errors": []
}
200
response_errors (list of strings)
400
401
500
Something went wrong (Internal Server Error)
B
Server in maintenance mode
>curl
--user username:passkey
--url https://www.availabilityexchange.com/gateway/getavailability?business_id=16609&unit_id=27796&start_date=2021-09-15&end_date=2021-09-01
{
"unit_id": 27796,
"capacity": 0,
"query_start": "2021-09-15",
"query_end": "2021-09-01",
"availability": null,
"response_errors":
[
"The start date is after the end date"
]
}
All Rights Reserved | Availability Exchange
Website Design & Reservation Software by ResNexus