Cancel Flight

Cancel Flight API

The Cancel Flight API allows you to cancel booked flights. This API supports both full and partial cancellations, depending on your requirements.

Overview

Use this API to initiate flight cancellations for bookings. The API provides flexible cancellation options with detailed status tracking.

API Endpoint

POST /flight/cancel

Request Headers

HeaderRequiredDescription
client-idYesYour unique client ID
client-secretYesYour client secret key for authentication
Content-TypeYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
client_referenceIdstringYesUnique reference ID for tracking the cancellation request
booking_idintegerYesThe unique booking ID of the flight reservation to cancel
request_typestringYesType of cancellation request. Options: full_cancellation or partial_cancellation
reasonstringYesReason for cancellation. Options: no_show, flight_cancelled, or others
remarksstringYesAdditional comments or information about the cancellation
journeysarrayConditionalRequired only for partial_cancellation - List of journey segments to cancel
ticket_idarrayConditionalRequired for partial cancellation - Array of specific ticket IDs to cancel

Request Type Options

  • full_cancellation: Cancels the entire booking including all passengers and segments
  • partial_cancellation: Cancels specific passengers or journey segments (requires additional parameters)

Cancellation Reasons

  • no_show: Passenger did not show up for the flight
  • flight_cancelled: Flight was cancelled by the airline
  • others: Other reasons for cancellation

Example Request

{
  "client_referenceId": "ABC12345656789",
  "booking_id": 1984869,
  "request_type": "full_cancellation",
  "reason": "flight_cancelled",
  "remarks": "Flight was cancelled by the airline."
}

Response Structure

The API returns a detailed response with cancellation status and processing information.

Response Parameters

ParameterTypeDescription
statusstringOverall status of the cancellation request (SUCCESS, FAILED, PENDING)
status_codestringHTTP status code of the response
messagestringDescriptive message about the cancellation result
dataobjectDetailed cancellation processing information

Data Object Parameters

ParameterTypeDescription
trace_idstringUnique identifier for tracking the cancellation process
resultarrayArray of cancellation results for each ticket processed

Result Array Parameters

ParameterTypeDescription
request_idintegerInternal request ID for the cancellation
ticket_idintegerUnique identifier of the cancelled ticket
statusintegerCancellation status (1 = successful, 0 = failed)
remarksstringStatus remarks for the specific ticket
request_statusstringCurrent processing status of the request

Example Response

{
    "status": "SUCCESS",
    "status_code": "200",
    "message": "Cancellation of ticket processed successful.",
    "data": {
        "trace_id": "677e0e8c-69f6-4480-b3c8-b89308f1b0bd",
        "result": [
            {
                "request_id": 320073,
                "ticket_id": 2263870,
                "status": 1,
                "remarks": "Successful",
                "request_status": "Unassigned"
            }
        ]
    }
}

Status Codes

Status CodeDescription
200Cancellation request processed successfully
400Bad request - Invalid parameters or booking not found
401Unauthorized - Invalid authentication credentials
500Internal server error

Error Handling

If the cancellation request fails, the API will return appropriate error codes and messages. Common error scenarios include:

  • Invalid booking ID
  • Booking already cancelled
  • Cancellation not allowed for the fare type
  • Technical issues with airline systems

Always implement proper error handling in your integration to manage these scenarios effectively.

Language
Click Try It! to start a request and see the response here!