Exchange Ticket
Exchange (change) tickets for an existing booking. This is a 3-step process: Search → Reprice → Confirm.
Step 1: Exchange Search
Search for available flights to exchange tickets.
Endpoint
- URL:
/api/v1/flight/exchange-search - Method:
POST - Auth Required: Yes (Bearer Token/X-api-key)
- Content-Type:
application/json
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | Yes | Booking system code (e.g., VN, VJ, 1A) |
| bookingCode | string | Yes | Booking code (PNR) |
| flightValueCancels | array | Yes | Flight values to cancel (from booking) |
| newFlights | array | Yes | New flight requests (see FlightRequest) |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"flightValueCancels": ["encoded_flight_value_1"],
"newFlights": [
{
"leg": 0,
"startPoint": "SGN",
"endPoint": "HAN",
"departDate": "2024-06-02"
}
]
}
Response Structure
Returns an array of TripOtaFlightSearchResponse objects (same as flight search).
Step 2: Exchange Reprice
Check the price difference before confirming the exchange.
Endpoint
- URL:
/api/v1/flight/exchange-reprice - Method:
POST - Auth Required: Yes (Bearer Token/X-api-key)
- Content-Type:
application/json
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | Yes | Booking system code |
| bookingCode | string | Yes | Booking code (PNR) |
| flightCancels | array | Yes | Flight values to cancel |
| flightExchanges | array | Yes | Flight values to exchange (from exchange-search) |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"flightCancels": ["encoded_flight_value_1"],
"flightExchanges": ["encoded_new_flight_value"]
}
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name |
| status | boolean | No | Success status |
| error | object | Yes | Error details |
| description | string | Yes | Error description |
| trackingId | string | Yes | Tracking ID |
| trackingTime | string | Yes | Tracking time |
| bookingCode | string | Yes | Booking code |
| exchangeValue | string | Yes | Exchange value for confirm step |
| exchangePricingDetails | array | Yes | Pricing details (see ExchangeTicketInfo) |
Step 3: Exchange Confirm
Confirm and finalize the ticket exchange.
Endpoint
- URL:
/api/v1/flight/exchange-confirm - Method:
POST - Auth Required: Yes (Bearer Token/X-api-key)
- Content-Type:
application/json
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | Yes | Booking system code |
| bookingCode | string | Yes | Booking code (PNR) |
| exchangeValue | string | Yes | Exchange value from reprice step |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"exchangeValue": "encoded_exchange_value_from_reprice"
}
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name |
| status | boolean | No | Success status |
| error | object | Yes | Error details |
| description | string | Yes | Error description |
| trackingId | string | Yes | Tracking ID |
| trackingTime | string | Yes | Tracking time |
| bookingCode | string | Yes | Updated booking code |
| exchangePricingDetails | array | Yes | Exchange pricing details (see ExchangeTicketInfo) |
ExchangeTicketInfo Object
| Field | Type | Nullable | Description |
|---|---|---|---|
| ticketNumber | string | Yes | Ticket number |
| passenger | string | Yes | Passenger information |
| oldPrice | Money | Yes | Old ticket price |
| newPrice | Money | Yes | New ticket price |
| different | Money | Yes | Price difference |
| penalty | Money | Yes | Penalty amount |
| refund | Money | Yes | Refund amount |
Example Response:
{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc123",
"trackingTime": "2025-07-01T07:00:00.000Z",
"bookingCode": "ABC123",
"exchangePricingDetails": [
{
"ticketNumber": "2389876543210",
"passenger": "NGUYEN VAN A",
"oldPrice": { "amount": 2000000, "currency": "VND" },
"newPrice": { "amount": 2050000, "currency": "VND" },
"different": { "amount": 50000, "currency": "VND" },
"penalty": { "amount": 100000, "currency": "VND" },
"refund": { "amount": 0, "currency": "VND" }
}
]
}
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 tampering with
bookingCodeand segment data.
Validation Questions
- Are there limits on the number of exchanges per booking?
- Are there time or fare restrictions for exchanges?
For integration support, see Contact Support.