MODIFY RESERVATION



MODIFY RESERVATION

ModifyReservation()

ModifyReservation() allows changing an existing reservation to include a specific itinerary for a specific unit or unit group, instead of the itinerary and unit or unit group that it currently includes.  ModifyReservation() supports POST with a JSON request body that details the reservation and guest.  Note that credit card information is not currently supported by the Reservation end points and payment must be collected in accordance with the agreement made with the property.  You may only modify reservations that you created.


Note: Adding or subtracting dates from a reservation via modification requires the use of a quote object in the request. Modification requests that shift the reservation to entirely new dates will function without a quote

Request

Endpoint     

https://www.availabilityexchange.com/gateway/modifyreservation
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 perspective 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

    quote (object - optional)

        an object based on the response from GetQuote. Necessary when the modified reservation covers days held by the original reservation. The endpoint will return an itinerary unavailable error otherwise.

*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/modifyreservation
--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",
     "card_number": "2222-2222-2222-2222",
     "expire_month": "07",
     "expire_year": "2026",
     "card_cvv": "123"
}'

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 modify the reservation.  See
GetQuote() to get this object prior to creating the reservation

Response Example

{
    "response_errors": [],
    "action": Modify
    "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://www.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: