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
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code |
| bookingCode | string | No | Booking code (PNR) |
| flightCancels | array | No | List of flight values to cancel (array of strings) |
| flightAddNews | array | No | List 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.
flightCancelsandflightAddNewsmust reference valid segments within the booking.- The
confirmflag 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
trackingIdandtrackingTime.
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ) |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error code object |
| description | string | Yes | Error message or status description |
| trackingId | string | Yes | Request tracking ID |
| trackingTime | string | Yes | Request 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
confirmis false or omitted? - How are partial failures (e.g., some segments succeed, others fail) handled?
For integration support, see Contact Support.