GET UNIT GROUPS



GET UNIT GROUPS

GetUnitGroups()

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)

Request Example

>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

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
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 (list of 32-bit integers)
        the unit_ids of all units in this group.  See GetUnits()
   
number_of_units (32-bit integer)
        the number of units included in the unit group
     description (string)
        the unit group description
   
per_unit_capacity (32-bit integer)
        the total adults each unit in the group can hold

    max_children (32-bit integer)

        maximum number of children that are allowed for the unit
     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 (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 (string - 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


Response Example

{

  "business_id": 16609,

  "children_allowed": true,

  "age_considered_child": 12,

  "children_included_in_occupancy": true,

  "unit_groups": [

  {

  "unit_group_id": 23611,

  "business_id": 16609,

  "name": "AE Double King Suites",

  "unit_ids": [

  27802,

  27796,

  27810,

  27804,

  27803,

  27805,

  27806,

  27807,

  27808,

  27809

  ],

  "number_of_units": 10,

  "description": "Enjoy two king beds and relax in comfort. The 50\" TV and Blue-ray entertainment system is amazing.",

  "per_unit_capacity": 4,

  "max_children": 2,

  "default_rate": 0.0,

  "fees_per_stay": 25.0,

  "fees_per_day": 0.0,

  "image_urls": [

  "https://d8qysm09iyvaz.cloudfront.net/subscribers/4004829C-51BA-4527-8472-F2AB6AD1A9BD/7/b2a2e69b-04f1-488b-a715-3f0585788bb6.jpg",

  "https://d8qysm09iyvaz.cloudfront.net/subscribers/4004829C-51BA-4527-8472-F2AB6AD1A9BD/7/1a390dad-cdb0-4f2c-960a-2e9141672a7c.jpg",

  "https://d8qysm09iyvaz.cloudfront.net/subscribers/4004829C-51BA-4527-8472-F2AB6AD1A9BD/7/d0f031b0-7966-4a94-99d6-e973159212a5.jpg",

  "https://d8qysm09iyvaz.cloudfront.net/subscribers/4004829C-51BA-4527-8472-F2AB6AD1A9BD/7/0db33802-0021-4685-bf3c-a853809f56e6.jpg",

  "https://d8qysm09iyvaz.cloudfront.net/subscribers/4004829C-51BA-4527-8472-F2AB6AD1A9BD/7/120abd9c-4327-4f92-a12f-c411f1d96a0e.jpg"

  ],

  "unit_type": "ROOM",

  "site_length": "50",

  "site_amps": "TWENTY_AMPS",

  "site_features": "BACK_IN, PARKING_SPACE"

  }

  ],

  "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

Response Error Example

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

{

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

Return to API Endpoints

Share by: