Skip to main content

Retrieve Booking

Retrieve detailed information about an existing booking including passenger details, flight segments, pricing, and associated services.


Endpoint

  • URL: /api/v1/flight/retrieve
  • 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 (e.g., VN, VJ, 1A)
bookingCodestringNoBooking code (PNR)
showFaceBookingbooleanNoDisplay face booking

Example Request:

{
"system": "VN",
"bookingCode": "ABC123",
"showFaceBooking": false
}

Request Constraints & Business Rules

  • bookingCode must be provided to identify the booking.
  • The system should match the system where the booking was created.
  • Only accessible bookings can be retrieved (based on user permissions).
  • Some booking details may be masked or restricted based on user role.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ, 1A)
statusbooleanNotrue if successful, false if failed
errorobjectYesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestringYesTime for request tracking (ISO 8601 format)
airlinestringYesAirline code
bookingCodestringYesBooking code (PNR)
bookingStatusstringYesBooking status (OK, TICKETED, CANCELED)
bookingTimestringYesBooking creation time
totalAmountnumberYesTotal booking amount (including taxes and fees)
totalFareAmountnumberYesTotal fare amount (excluding taxes and fees)
totalTaxAmountnumberYesTotal tax amount
expirationDatestringYesBooking expiration date (ddMMyyyy HHmm)
timePurchasestringYesPayment deadline (ddMMyyyy HHmm)
contactobjectYesContact information (see BookingContact)
flightsarrayYesFlight segments (see BookingFlight)
passengersarrayYesPassenger information (see BookingPassenger)
ticketsarrayYesTicket information (see BookingTicket)
fareInfosarrayYesFare information by passenger type (see BookingFareInfo)
sKsarrayYesSpecial Keywords list (see BookingSKInfo)
osIsarrayYesOSI codes list (see BookingOSIInfo)
remarksarrayYesRemarks list (see BookingRemarkInfo)
faceBookingstringYesPlain text face booking
endorsementsarrayYesList of Endorsement (see EndorsementInfo)

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z",
"airline": "VN",
"bookingCode": "ABC123",
"bookingStatus": "OK",
"bookingTime": "2024-06-01T10:00:00Z",
"totalAmount": 2350000.0,
"totalFareAmount": 2000000.0,
"totalTaxAmount": 350000.0,
"expirationDate": "01062024 2359",
"timePurchase": "01062024 1800",
"contact": {
"name": "NGUYEN VAN A",
"phone": "+84901234567",
"email": "contact@example.com"
},
"flights": [
{
"leg": 0,
"startPoint": "SGN",
"endPoint": "HAN",
"startDate": "2024-06-02T08:00:00",
"endDate": "2024-06-02T10:00:00",
"segments": []
}
],
"passengers": [
{
"index": 1,
"surName": "SMITH",
"givenName": "JOHN",
"passengerType": "ADT",
"title": "MR"
}
],
"tickets": [],
"fareInfos": [],
"sKs": [],
"osIs": [],
"remarks": []
}

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.
  • Booking access is controlled based on user permissions.
  • Sensitive information may be masked based on user role.
  • All retrieval actions are logged and traceable.

Validation Questions

  • What booking statuses are retrievable?
  • Are there restrictions on retrieving bookings from different systems?
  • How is sensitive passenger information protected?
  • What information is available for canceled or expired bookings?

For integration support, see Contact Support.