GET UNITS
GetUnits() returns a list of the units for a business.
End Point
https://www.availabilityexchange.com/gateway/getunits
Parameters
business_id
(64-bit integer)
unique id of the business
unit_id
(comma separated 32-bit integer list- optional)
unique id of the unit(s). More than one id can be specified as a comma separated list. If omitted, all units for the specified business will be returned
>curl
--user userName:PassKey
--url "https://www.availabilityexchange.com/gateway/getunits?business_id=16609&unit_id=27796,27803"
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
units
(list of objects)
unit_id
(32-bit integer)
the unique identifier for the unit
name
(string)
the unit name
description
(string)
the unit description
capacity
(32-bit integer)
the total number of people the unit can hold, comprised of both adults and children
max_children (32-bit integer)
maximum number of children that are allowed for the unit
default_rate
(decimal) (Depricated)
default nightly rate (business currency)
fees_per_stay
(decimal)
total of all fees to be charged per stay
fees_per_day
(decimal)
total of all fees to be charged per day
image_urls
(list of strings - optional)
the urls of any publicly available images of the unit. These images provided by the property and are their responsibility. If no urls are available, this field is omitted
unit_group_id
(32-bit integer - optional)
the id of the unit group the unit is assigned to, if any. If null, this field will be omitted. See GetUnitGroups() for more info
unit_type
(string - optional)
if configured by the property, this is one of the following types:
ROOM
CABIN
TENT_SITE
RV_SITE
EVENT_SPACE
EQUIPMENT_RENTAL
site_length
(double - optional)
if configured by the property, this is the site length (in feet). Generally only populated for unit_type RV_SITE
site_amps
(string - optional)
if configured by the property, this is the types of RV amperage the site supports:
TWENTY_AMPS
THIRTY_AMPS
FIFTY_AMPS
site_features
(list of strings - optional)
if configured by the property, this is a list of features the site has:
PULL_THROUGH
BACK_IN
SEWER
WATER
PARKING_SPACE
TENT_SPACE
{
"business_id": 16609,
"children_allowed": true,
"age_considered_child": 12,
"children_included_in_occupancy": true,
"units": [
{
"name": "101 Double King Suite",
"description": "Enjoy two king beds and relax in comfort. The 50\" TV and Blue-ray entertainment system is amazing.",
"capacity": 4,
"max_children": 2,
"default_rate": 0.0,
"fees_per_stay": 25.0,
"fees_per_day": 0.0,
"image_urls": [
],
"unit_type": "ROOM",
"unit_id": 27802,
"unit_group_id": 23611,
"site_length": "50",
"site_amps": "TWENTY_AMPS",
"site_features": "BACK_IN, PARKING_SPACE"
}
],
"response_errors": []
}
200
response_errors
(list of strings)
Unable to access Units for Business
400
business_id should be a long
401
The credentials supplied are incorrect or you do not have access to this resource
500
Something went wrong (Internal Server Error)
503
Server in maintenance mode
>curl --user userName:PassKey "https://www.availabilityexchange.com/gateway/getunits?business_id=-1
{
"business_id": -1,
"units": [],
"response_errors": ["Unable to access Units for Business -1"]
}
All Rights Reserved | Availability Exchange
Website Design & Reservation Software by ResNexus