Skip to main content

Change Flight

Change the itinerary of an existing booking (PNR) before ticketing or as allowed by fare rules. This endpoint allows you to cancel existing flight segments and add new ones within a booking.


Endpoint

  • URL: /api/v1/flight/changeflight
  • Method: POST
  • Auth Required: Yes (Bearer Token/X-API-KEY)
  • Content-Type: application/json

Authentication

This endpoint requires a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Obtain tokens via /api/v1/sign-in (POST) with your credentials.


Request Structure

FieldTypeRequiredDescription
systemstringNoBooking system code
bookingCodestringNoBooking code (PNR)
flightCancelsarrayNoList of flight values to cancel (array of strings)
flightAddNewsarrayNoList of new flight values to add (array of strings)

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"flightCancels": [
"encoded_flight_value_to_cancel"
],
"flightAddNews": [
"encoded_new_flight_value"
]
}

Request Constraints & Business Rules

  • Only bookings that have not been ticketed or are eligible for change per fare rules can be modified.
  • flightCancels and flightAddNews must reference valid segments within the booking.
  • The confirm flag should be set to true to finalize the change; otherwise, the API may return a preview or validation result.
  • Changes may be subject to airline, fare, or system restrictions.
  • All changes are auditable via trackingId and trackingTime.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ)
statusbooleanNotrue if successful, false if failed
errorobjectYesError code object
descriptionstringYesError message or status description
trackingIdstringYesRequest tracking ID
trackingTimestringYesRequest tracking timestamp

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z"
}

Error Codes

See Error Codes for details on possible error responses.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • All actions are logged and traceable.

Validation Questions

  • What are the allowed states for a booking to be changed?
  • Are there restrictions on which segments can be canceled or added?
  • What happens if confirm is false or omitted?
  • How are partial failures (e.g., some segments succeed, others fail) handled?

For integration support, see Contact Support.