Cancel Booking
Cancel an existing booking (PNR) fully or partially (by segment). This endpoint is used to void or release a booking before ticketing or as allowed by fare rules.
Endpoint
- URL:
/api/v1/flight/cancelbooking - 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>
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | System code (e.g., VN, VJ, 1A) |
| bookingCode | string | No | Booking code (PNR) |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123"
}
Request Constraints & Business Rules
systemandbookingCodemust refer to a valid, active booking.- If
cancelAllis true or omitted, the entire booking will be canceled. - If
listSegmentIdis provided, only the specified segments will be canceled (partial cancel, if supported). - Only bookings that are eligible for cancellation (per fare rules, status) can be canceled.
- Some bookings may not be cancelable after ticketing or after certain deadlines.
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | Name of the airline system |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error details (if any) |
| description | string | Yes | Error description (if any) |
| trackingId | string | Yes | Tracking ID for request logs |
| trackingTime | string | Yes | Time for request tracking |
Example Response:
{
"system": "VN",
"status": true,
"description": null,
"trackingId": "abc123",
"trackingTime": "2025-07-01T08:10:00.000Z"
}
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.
- The endpoint is protected against unauthorized cancellation attempts and data tampering.
- Use HTTPS for all requests. Handle and store personal data in compliance with GDPR and other relevant regulations.
Validation Questions
- Are there restrictions on canceling bookings after ticketing or after certain deadlines?
- Is partial cancellation (by segment) supported for all airlines/systems?
- What is the refund policy or penalty for cancellations?
- Are there audit logs for cancellation actions?
For integration support, see Contact Support.