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
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code (e.g., VN, VJ, 1A) |
| bookingCode | string | No | Booking code (PNR) |
| showFaceBooking | boolean | No | Display face booking |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"showFaceBooking": false
}
Request Constraints & Business Rules
bookingCodemust be provided to identify the booking.- The
systemshould 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
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ, 1A) |
| 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 (ISO 8601 format) |
| airline | string | Yes | Airline code |
| bookingCode | string | Yes | Booking code (PNR) |
| bookingStatus | string | Yes | Booking status (OK, TICKETED, CANCELED) |
| bookingTime | string | Yes | Booking creation time |
| totalAmount | number | Yes | Total booking amount (including taxes and fees) |
| totalFareAmount | number | Yes | Total fare amount (excluding taxes and fees) |
| totalTaxAmount | number | Yes | Total tax amount |
| expirationDate | string | Yes | Booking expiration date (ddMMyyyy HHmm) |
| timePurchase | string | Yes | Payment deadline (ddMMyyyy HHmm) |
| contact | object | Yes | Contact information (see BookingContact) |
| flights | array | Yes | Flight segments (see BookingFlight) |
| passengers | array | Yes | Passenger information (see BookingPassenger) |
| tickets | array | Yes | Ticket information (see BookingTicket) |
| fareInfos | array | Yes | Fare information by passenger type (see BookingFareInfo) |
| sKs | array | Yes | Special Keywords list (see BookingSKInfo) |
| osIs | array | Yes | OSI codes list (see BookingOSIInfo) |
| remarks | array | Yes | Remarks list (see BookingRemarkInfo) |
| faceBooking | string | Yes | Plain text face booking |
| endorsements | array | Yes | List 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.