CANCEL Reservation


CancelReservation() allows cancelling an existing reservation.  CancelReservation() supports POST with a JSON request body that details the reservation to be cancelled.  Cancellations are subject to any agreement made with the property by the guest and/or by the partner.  Partners may only cancel reservations that they created.

REQUEST


Endpoint      https://www.availabilityexchange.com/gateway/cancelreservation
Parameters
    None
Request Body
     business_id (long int)
    external_id (string)
        The external_id is the unique identifier of the reservation in your system.  

EXAMPLE REQUEST

>curl  -X POST https://www.availabilityexchange.com/gateway/cancelreservation
--user username:accesskey 
-H 'Content-Type: application/json'
-d '{
     "business_id":"16609",
     "external_id":"FakeReservation001"
}'

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

EXAMPLE RESPONSE

{
    "response_errors": [],
    "action": Cancel
    "external_id": "FakeReservation001",
    "reservation_id": "244995",
}


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/cancelreservation
--user username:accesskey
-H 'Content-Type: application/json'
-d '{
"business_id":"9999",
"external_id":"FakeReservation001"
}'

business not found