GET Unit Groups


GetUnitGroups() returns a list of Unit Groups for a given business id.  Unit Groups are groups of rooms that have similar amenities and identical rates.  When reserving or requesting quotes for a unit group, one of the available members of the group will be selected by the API.  Unit Groups will be configured by the property on a per-partner basis.

REQUEST


End Point        https://www.availabilityexchange.com/gateway/getunitgroups
Parameters
    business_id (64-bit integer)

EXAMPLE REQUEST

>curl
--user userName:PassKey 
--url "https://www.availabilityexchange.com/gateway/getunitgroups?business_id=16609"


RESPONSE


response_errors (See Response Errors)
business_id (64-bit integer)
    the unique identifier for this business
unit groups (list of objects)
    unit_group_id (32-bit integer)
        the unique identifier for the unit group
    name (string)
        the unit group name as specified by the property
    unit_ids (array 32-bit integers)
        the unit_ids of all units in this group.  See GetUnits()
    number_of_units (int)
        the number of units included in the unit group
      description (string)
         the unit group description
     per_unit_capacity (integer)
         the total adults each unit in the group can hold
      default_rate (decimal) (Deprecated
         default nightly rate (business currency)
         value returned by the API which should not be used
      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)
         the urls of any publicly available images for the unit group.  These images provided by the property and are their responsibility. If no urls are available, this field is omitted
       unit_type (enum?)
         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?)
           if configured by the property, this is the site length (in feet). Generally only populated for unit_type RV_SITE
         site_amps (enum?)
           if configured by the property, this is the types of RV amperage the site supports:
           TWENTY_AMPS
           THIRTY_AMPS
           FIFTY_AMPS
        site_features (enum?)
           if configured by the property, this is a list of features the site has:
           PULL_THROUGH
           BACK_IN
           SEWER
           WATER
           PARKING_SPACE
           TENT_SPACE

EXAMPLE RESPONSE

{
    "business_id": 16609,
    "unit_groups": [
    {
        "unit_group_id": 9471,
        "business_id": 16609,
        "name": "Kings",
        "unit_ids": [
            27802,
            27810,
            27804,
            27803,
            27796,
            27805,
            27806,
            27807,
            27808,
            27809
        ]
    }
    ],
    "response_errors": []
}


RESPONSE ERRORS


200
    response_errors (list of strings)
        Unable to access Unit Groups for Business
400
    business_id should be a long
401 
  • This site requires a secure connection over HTTPS
  • 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

EXAMPLE ERROR RESPONSE

>curl --user userName:PassKey "https://www.availabilityexchange.com/gateway/getunitgroups?business_id=-1

{
    "business_id": -1,
    "units": [],
    "response_errors": ["Unable to access Unit Groups for Business -1"]
}