Select Flight
Verify and confirm flight selection with updated pricing. This endpoint validates the selected flight options from search results and returns confirmed pricing before proceeding to booking.
Endpoint
- URL:
/api/v1/flight/select - 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 | Yes | System code (e.g., VN, VJ, 1A) |
| validatingCarrier | string | No | Validating carrier used by GDS systems (1A, 1B, 1G) for price verification, booking, and ticketing |
| flightValues | array | Yes | Flight values from search results |
| isUpSell | boolean | No | Whether to enable upselling (NDC only) |
| issueDate | DateOnly | No | Ticket issue date used for pricing rules when applicable (YYYY-MM-DD, applies to VN) |
Sample Request:
{
"system": "VN",
"validatingCarrier": "VN",
"flightValues": [
"encoded_flight_value_from_search_1",
"encoded_flight_value_from_search_2"
],
"isUpSell": false,
"issueDate": "2024-06-01"
}
Request Constraints & Business Rules
flightValuesmust be obtained from a recent Search Flight response.- Use the encoded
flightValuereturned by Search Flight without modifying its content. - Flight values have expiration times and may become invalid.
- The
isUpSellparameter is only applicable for NDC (New Distribution Capability) systems. validatingCarrieris used by GDS systems (1A, 1B, 1G) and should match the carrier used for pricing, booking, and ticketing.issueDatecan be provided when airline pricing depends on the intended ticket issue date.- Selected flights must still be available at the time of selection.
- Price verification occurs during this step, and prices may change from search results.
- System must match the system used in the original search.
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) |
| totalPrice | number | No | Confirmed total price after selection |
| offerFareRules | array | Yes | Fare rules (for NDC systems) |
| fareDatas | array | Yes | Selected fare data plus additional offers |
Sample Response:
{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z",
"totalPrice": 2350000,
"offerFareRules": [],
"fareDatas": [
{
"fareDataId": 1,
"currency": "VND",
"totalPrice": 2350000,
"options": [
{
"flightNumber": "VN123",
"departure": "SGN",
"arrival": "HAN",
"departureTime": "08:00",
"arrivalTime": "10:00"
}
]
}
]
}
Error Codes
This endpoint may return the following error codes:
- 04000 - Select Verify: Errors specific to flight selection and verification (04000-04002)
- 00000 - Flight Hub (General Errors): General system and authentication errors (00001-00056)
For a complete list of error codes, see Error Codes.
Security & Validation
- All input is validated for type and required fields.
- Only authenticated users can access this endpoint.
- Flight values are validated for authenticity and expiration.
- Price changes are detected and reported in the response.
- All selection actions are logged and traceable.
Validation Questions
- How long are flight values valid after search?
- What happens if selected flights become unavailable during selection?
- Are there price change thresholds that require user confirmation?
- How does the upselling feature work for NDC systems?
For integration support, see Contact Support.