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) |
| flightValues | array | Yes | Flight values from search results |
| isUpSell | boolean | No | Whether to enable upselling (NDC only) |
Example Request:
{
"system": "VN",
"flightValues": [
"encoded_flight_value_from_search_1",
"encoded_flight_value_from_search_2"
],
"isUpSell": false
}
Request Constraints & Business Rules
- Flight values must be obtained from a recent flight search response.
- Flight values have expiration times and may become invalid.
- The
isUpSellparameter is only applicable for NDC (New Distribution Capability) systems. - 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 |
Example 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
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.
- 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.