Skip to main content

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

FieldTypeRequiredDescription
systemstringYesSystem code (e.g., VN, VJ, 1A)
flightValuesarrayYesFlight values from search results
isUpSellbooleanNoWhether 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 isUpSell parameter 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

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)
totalPricenumberNoConfirmed total price after selection
offerFareRulesarrayYesFare rules (for NDC systems)
fareDatasarrayYesSelected 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.