Skip to main content

Exchange Ticket

Exchange (change) tickets for an existing booking. This is a 3-step process: Search → Reprice → Confirm.


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

FieldTypeRequiredDescription
systemstringYesBooking system code (e.g., VN, VJ, 1A)
bookingCodestringYesBooking code (PNR)
flightValueCancelsarrayYesFlight values to cancel (from booking)
newFlightsarrayYesNew 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

FieldTypeRequiredDescription
systemstringYesBooking system code
bookingCodestringYesBooking code (PNR)
flightCancelsarrayYesFlight values to cancel
flightExchangesarrayYesFlight values to exchange (from exchange-search)

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"flightCancels": ["encoded_flight_value_1"],
"flightExchanges": ["encoded_new_flight_value"]
}

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name
statusbooleanNoSuccess status
errorobjectYesError details
descriptionstringYesError description
trackingIdstringYesTracking ID
trackingTimestringYesTracking time
bookingCodestringYesBooking code
exchangeValuestringYesExchange value for confirm step
exchangePricingDetailsarrayYesPricing 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

FieldTypeRequiredDescription
systemstringYesBooking system code
bookingCodestringYesBooking code (PNR)
exchangeValuestringYesExchange value from reprice step

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"exchangeValue": "encoded_exchange_value_from_reprice"
}

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name
statusbooleanNoSuccess status
errorobjectYesError details
descriptionstringYesError description
trackingIdstringYesTracking ID
trackingTimestringYesTracking time
bookingCodestringYesUpdated booking code
exchangePricingDetailsarrayYesExchange pricing details (see ExchangeTicketInfo)

ExchangeTicketInfo Object

FieldTypeNullableDescription
ticketNumberstringYesTicket number
passengerstringYesPassenger information
oldPriceMoneyYesOld ticket price
newPriceMoneyYesNew ticket price
differentMoneyYesPrice difference
penaltyMoneyYesPenalty amount
refundMoneyYesRefund 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 bookingCode and 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.