ADD RESERVATION



ADD RESERVATION

AddReservation() 

AddReservation() allows booking of a specific itinerary for a specific unit or unit group.  AddReservation() supports POST with a JSON request body that details the reservation and guest.  Credit Card information may be provided, but only if you have a current PCI Attestation on file with ResNexus.  DO NOT provide credit card information if you do not wish the property to process the card.

Request

Endpoint     

https://www.availabilityexchange.com/gateway/addreservation
Parameters
    None
Request Body
   
business_id (64-bit integer)
       the unique identifier for the property
   
check_in (date YYYY-MM-dd)
        the check in date requested
   
check_out (date YYYY-MM-dd)
        the check out date requested
   
unit_id (32-bit integer)
        the unique id for the unit requested
   
unit_group_id (64-bit integer)
        the unique id for the unit group.  Exactly one of unit_id or unit_group_id should be provided
   
num_adults (32-bit integer)
        the number of adults to make the reservation for.  This may affect the rate depending on the property's rate configuration

    num_children (32-bit integer)
        the number of children included in the itinerary. If not specified, no children (0) will be assumed
   
customer (object)
        the prospective guests' information.  For this endpoint, first_name, last_name, phone_number, address and email are required

        card_name (string)*

            the name on the card
        card_cvv (string)*

            the CVV for the credit card
        expire_month (int)*

            the two digit month for the credit card's expiration

        expire_year (int)*

            the four digit year for the credit card's expiration

    card_number (string)*

        the credit card number to charge for this reservation

    external_id (string)

        the unique identifier of the reservation in your system.  The string must be 25 or less characters in length.  It is free form and is required to modify or cancel the reservation after it is created
    notes_from_partner (string)

        a free-form text field that will be displayed to the property in the reservation notes

*You may only add credit card information in a reservation request if you have a current PCI Attestation on file with ResNexus


Request Example

>curl  -X POST https://www.availabilityexchange.com/gateway/addreservation
--user username:accesskey 
-H 'Content-Type: application/json'
-d '{
     "business_id":"16609",
     "check_in":"2021-12-20",
     "check_out":"2021-12-24",
     "unit_id":"27795",
    "num_adults":"2",
     "customer":{
         "first_name":"Joe",
         "last_name":"Schmoe",
         "phone_number":"1234445566",
         "email":"joe@schmoe.com",
         "address":{
              "address_line": "1234 Schmoe St",
              "city":"Schmoton",
              "state_or_province":"OH",
              "postal_code":"12345",
              "country":"USA"
          }
     },
     "external_id":"FakeReservation001",
     "notes_from_partner":"Your base rate: $300.00 \n Our commission: $45.00 (15%) \n Taxes: $22.50 \n Your payout will be: $232.50 \n Adults: 2 \n Children: 0 \n Pets: 2 \n Vehicle Details: Travel Trailer, 34 feet, passenger slideouts"
}'

Response

response_errors (See Response Errors)
business_id, check_in, check_out, etc
    the fields used in the request will be returned in the response
reservation_id (32-bit integer)
   the reservation's unique id in the property's reservation system
quote (object)
   the quote used to create the reservation.  See GetQuote() to get this object prior to creating the reservation

Response Example

{
    "response_errors": [],
    "action": Create
    "business_id": "16609",
    "check_in": "2021-12-21",
    "check_out": "2021-12-23",
    "unit_id": "27795",
    "customer": {
        "first_name": "Joe",
        "last_name": "Schmoe",
        "phone_number": "4445556666",
        "address": {
            "address_line": "123 Schmoe St",
            "city": "Schmotown",
            "state_or_province": "Ohio",
            "country": "USA",
            "postal_code": "12345-98765"
        },
        "email": "joe@schmoe.com"
    },
    "external_id": "FakeReservation001",
    "reservation_id": "244995",
    "quote": {
        "pricing_type": "DirectQuote",
        "check_in": "2021-12-21",
        "check_out": "2021-12-23",
        "available": "Y",
        "base_rate": "200",
        "taxes": "0",
        "fees": "0",
        "unit_id": "27795",
        "booking_link": "https://resnexus.com/resnexus/reservations/book/4004829C-51BA-4527-8472-F2AB6AD1A9BD?startdate=12%2f20%2f2021&nights=3&aeunit=vQ82vXDGpLmFdWbJuhm2&adults=2",
        "currency": "USD",
        "occupancy": "2",
    }
}

Response Errors

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

Response Error Example

>curl -X POST https://availabilityexchange.com/gateway/getbusinesses
--user username:accesskey
-H 'Content-Type: application/json'
-d '{
"business_id": "9999",
"check_in": "2021-12-20",
"check_out": "2021-12-24",
"unit_id": "27795",
"check_in": "2021-12-20",
"check_out": "2021-12-23",
"customer": {
"first_name": "Joe",
"last_name": "Schmoe",
"phone_number": "4445556666",
"email": "joe@schmoe.com"
},
"external_id": "FakeReservation001"
}

business not found

Return to API Endpoints

Share by: