Cancel Booking

Discover how to use Cancel API calls to cancel existing itineraries. This can be called directly with your API key with booking reference id. It returns details about a booking details associated with the itinerary id along with cancel links to cancel the booking.

Parameters

Name

Description

Accept

string

( header )

Must be application/json

Accept - Encoding

string

( header )

Must be gzip

Authorization

string

( header )

Must be Your PID

Must be Your API Key

Customer-Ip

string

( header )

Must be IP address of the customer, as captured by your integration. Send IPV4 addresses only.

Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.

Also used for fraud recovery and other important analytics.

Definition and request parameters for cancel booking

action

string

( query )

Must be "cancelHotelBooking" as parameter

Action methods in Web API controller can have one or more parameters of different types. It can be either primitive type or complex type. Web API binds action method parameters either with URL's query string or with request body depending on the parameter type.

BookingId

string

( query )

The BookingId ID generated at the time of booking.

order_id

string

( query )

The Order_id generated at the time of booking.

reason

string

( query )

The reason behind cancellation

REQUEST

API Endpoint: https://www.abengines.com/api/v1/travel-api/hotels/

header: array(
'Content-Type:application/json',
'Accept-encoding: gzip',
'PID:'ADD-YOUR-PID',
'x-api-key:'ADD-YOUR-KEY'
);

POST: 
{
  "action": "cancelHotelBooking",
  "mode": "Test",
  "order_id": "104519726",
  "BookingId": "46615902",
  "reason": "others",
}
					 

Response

The API returns an HTTP response, which generally includes the result of the request invocation

{
    "Status": 605,
    "status_message": "Booking has been cancelled ",
    "responseData": {
  "HotelChangeRequestResult": {
    "B2B2BStatus": false,
    "CancellationChargeBreakUp": {
      "CancellationFees": 0.00,
      "CancellationServiceCharge": 0.00
    },
    "TotalServiceCharge": 0.00,
    "ResponseStatus": 1,
    "Error": {
      "ErrorCode": 0,
      "ErrorMessage": ""
    },
    "TraceId": "3b62998f-46dc-4482-bf79-23619a6f221f",
    "ChangeRequestId": 7665834,
    "RefundedAmount": 699.00,
    "TotalPrice": 698.54,
    "ChangeRequestStatus": 3,
    "CreditNoteNo": "MZ\/2122\/29250",
    "CreditNoteCreatedOn": "2021-07-09T13:10:54",
    "GST": {
      "CGSTAmount": 0.00,
      "CGSTRate": 0.00,
      "CessAmount": 0.00,
      "CessRate": 0.00,
      "IGSTAmount": 0.00,
      "IGSTRate": 18.00,
      "SGSTAmount": 0.00,
      "SGSTRate": 0.00,
      "TaxableAmount": 0.00
    }
  }
}

}