MODIFY Reservation


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.

REQUEST


Endpoint      https://www.availabilityexchange.com/gateway/modifyreservation
Parameters
    None
Request Body
     business_id (long int)
         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 (int)
        the unique id for the unit requested
    unit_group_id (long int)
        the unique id for the unit group.  Exactly one of unit_id or unit_group_id should be provided
    num_adults (int)
        the number of adults to make the reservation for.  This make affect the rate, depending on the property's rate configuration
    customer (object)
         the perspective guests' information.  For this endpoint, first_name, last_name, phone_number, address and email are required
    external_id (string)
        The external_id is the unique identifier of the reservation in your system.  The string is free form and is required to modify or cancel the reservation after it is created
     card_number (string)*
        the credit card number to charge for this reservation
      card_cvv (string)*
        the CVV for the credit card
    card_name (string)*
        the name on the 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
      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

EXAMPLE REQUEST

>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 (int)
   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

EXAMPLE RESPONSE

{
    "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

EXAMPLE ERROR RESPONSE

>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