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.

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.

apiKey

string

( query )

Must be a valid API Key

The API Key provided to you is critical to the security of your request data – treat it like a password. Never include the raw value in any publicly accessible site or app code. You will be provided with an API key when you are approved to integrate TPS API.

ModeType

string

( query )

Must be either "Test" or "LIVE"

Your application must be approved from Adivaha Personnel. All the transactions will be treated as LIVE once the parameter is set to LIVE.

requestBody

array

( query )

Must be an array with the following parameters

itineraryId

string

( query )

The Itinerary ID generated at the time of booking.

reason

string

( query )

The reason behind cancellation

REQUEST

API Endpoint: https://your-end-point/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",
  "itineraryId": "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
    }
  }
}

}