GET Rates


GetRates() returns the rates for a unit or list of units and date range.  The start_date and end_date are dates of stay, not the check_in and check_out dates of a possible itinerary.  Use GetQuote() to specify an itinerary.
 

REQUEST


End Point
    https://www.availabilityexchange.com/gateway/getrates
Parameters
    business_id (64-bit integer)
        the unique identifier for this business
    unit_id (32-bit integer)
        the unique unit id.  More than one id can be specified
    unit_group_id (32-bit integer)
        the unique unit group id.  More than one id can be specified.  At most one of unit_id and unit_group_id can be specified.  If both are omitted, availability will be provided in the default terms for the property, depending on whether or not they have unit groups configured
    start_date (date YYYY-MM-dd)
        first date of date range
    end_date (date YYYY-MM-dd)
        last date of the date range
    num_adults (32-bit integer, optional)
        number of adults the rate includes

EXAMPLE REQUEST

>curl --user username:accesskey
--url "https://www.availabilityexchange.com/gateway/getrates?business_id=16609&unit_id=27795&start_date=2021-09-02&end_date=2021-09-15"


RESPONSE


response_errors (See Response Errors)
rate_adjustment (string)
the amount or percentage that the property increases or decreases rates globally for your channel.
default_rate
(decimal)
    the default nightly rate
query_start (date YYYY-MM-dd)
    the first date these rates apply to
query_end (date YYYY-MM-dd)
    the last date these rates apply to
rates (list of objects)
    list of rate objects
    unit_id (32-bit integer)
        the unique identifier for the unit
    rate (decimal)
        the nightly rate
    start (date YYYY-MM-dd)
        the first date this rate applies to
    end (date YYYY-MM-dd)
        the last date this rate applies to
    number_of_adults (32-bit integer)
        the base number of adults for this rate
    extra_adult_rate (decimal)
        amount added for each extra adult after number_of_adults

*This field is only available to partners who act as resellers and do not display booking rates directly to guests, and is hidden by default.  Please contact us if you believe you qualify to receive this information

EXAMPLE RESPONSE

{
    "response_errors": [],
    "rate_adjustment": "10.000%",
    "default_rate": 0.0,
    "query_start": "2021-09-01",
    "query_end": "2021-09-04",
    "rates":
    [
        {
            "unit_id": 27795,
            "rate": 115.0000,
            "start": "2021-08-29",
            "end": "2021-09-02",
            "number_of_adults": 2,
            "extra_adult_rate": 10.0000
         }, {
            "unit_id": 27795,
            "rate": 125.0000,
            "start": "2021-09-03",
            "end": "2021-09-04",
            "number_of_adults": 2,
            "extra_adult_rate": 10.0000
        }
    ]
}


RESPONSE ERRORS


200
    response_errors (list of strings)
  • The start date is after the end date
  • is a test property only. Do not use this data for any purpose besides testing
  • The query cannot contain dates before today
  • Unit#<y> for Business <x>  is unavailable or does not exist

400

  • business_id should be a long
  • unit_id should be an int
  • dates should be formatted 'YYYY-MM-DD'
  • num_adults should be an int or omitted

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:accesskey
--url "https://www.availabilityexchange.com/gateway/getrates?business_id=16609&unit_id=27795&start_date=2021-09-02&end_date=2021-09-15"

{
    "unit_id": 27795,
    "default_rate": 0.0,
    "query_start": "2021-05-06",
    "query_end": "2021-05-09",
    "Rates": [],
    "response_errors":
    [
        "Unable to pull rates for Property 16609"
    ]
}