VerticalAPI

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 ticket cancellation

action

string

( query )

Must be "ticketCancel" 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.

order_id

string

( query )

The Order ID generated at the time of booking.

ChangeRequestData

array

( query )

Must be an array with the following parameters

TokenId

string

( query )

(Token Id to be echoed back from Authenticate response)

BookingId

string

( query )

The Booking Id generated at the time of booking.

RequestType

Enumeration

( query )

Request type

NotSet = 0,FullCancellation = 1,PartialCancellation = 2,Reissuance = 3

CancellationType

Enumeration

( query )

Cancellation type

NotSet = 0,NoShow = 1,FlightCancelled = 2,Others = 3

Sectors

Array

( query )

Mandatory only in case of partial cancellation

Origin

string

( query )

Origin Iata Code

Destination

string

( query )

Destination Iata Code

TicketId

Array

( query )

[ may send multiple comma separated ticket ids]

EndUserIp

string

( query )

IP Address of the end user

Remarks

string

( query )

Remarks for cancelling the booking

REQUEST

API Endpoint: https://your-end-point/api/v1/travel-api/flights/

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

POST:
{
  "action": "ticketCanceltest",
  "order_id": "610b986b67fea",
  "ChangeRequestData": {
    "BookingId": 1697020,
    "RequestType": 1,
    "CancellationType": 3,
    "Sectors": [
      {
        "Origin": "DEL",
        "Destination": "SVO"
      }
    ],
    "TicketId": [
      1567415,
      1567416
    ],
    "Remarks": "Test remarks",
    "EndUserIp": "192.168.11.23",
    "TokenId": "a3db0ecd-079e-4fa4-abda-157f5a8b2a60"
  }
}
					 

Response

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

{
    "status": "200",
    "status_message": "OK",
    "responseData": {
        "Response": {
            "B2B2BStatus": false,
            "TicketCRInfo": [
                {
                    "ChangeRequestId": 282283,
                    "TicketId": 1567415,
                    "Status": 1,
                    "Remarks": "Successful",
                    "ChangeRequestStatus": 1
                },
				{
                    "ChangeRequestId": 282284,
                    "TicketId": 1567416,
                    "Status": 1,
                    "Remarks": "Successful",
                    "ChangeRequestStatus": 1
                }
				
            ],
            "ResponseStatus": 1,
            "TraceId": "5e43160c-8953-4c6e-bd4b-47267e644d00"
        }
    }
}