Skip to main content

Get Ancillaries

Retrieve available ancillary services (e.g., meals, insurance, priority check-in) for a selected flight option.


Endpoint​

  • URL: /api/v1/flight/getancillaries
  • 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)
flightValuestringYesEncoded flight value from Search Result
airlinestringNoAirline code (IATA 2-letter, e.g., VN, VJ, AF)

Sample Request:

{
"system": "VN",
"flightValue": "eyJmYXJlRGF0YUlkIjoxLCJvcHRpb25JZCI6MCwiZmxpZ2h0SWQiOjAsImxlZyI6MCwiYWlybGluZSI6IlZOIiwg...",
"airline": "VN"
}

Request Constraints & Business Rules​

  • Before booking, system and flightValue must match the values from the Search Flight response.
  • After booking or after ticket issuance, use the latest flightValue from the Retrieve Booking response. This ensures the most up-to-date and valid flight context.
  • Do not reuse an old flightValue if the booking itinerary has changed.
  • airline must be a valid IATA code for the selected flight.
  • Only available after a successful flight search.

Response Structure​

FieldTypeNullableDescription
systemstringYesName of the airline system
statusbooleanNotrue if successful, false if failed
errorErrorCode (object)YesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestring (date-time)YesTime for request tracking
ancillariesarray of AncillaryYesList of available ancillary services

Ancillary Object​

FieldTypeNullableDescription
codestringYesAncillary service code
namestringYesService name (e.g., Meal, Insurance)
typestringYesService type (WCHR - wheelchair, MEAL - meal, OTHER - other service)
routestringYesRoute the service applies to (e.g., HANSGN)
pricesarray of PriceAncillaryTypeYesPrice details for each passenger type

PriceAncillaryType Object​

FieldTypeNullableDescription
passengerIdstringYesPassenger ID (for post-booking queries)
passengerTypestringYesPassenger type (ADT, CHD, INF)
pricenumberNoTotal price for this passenger type
currencystringYesCurrency (e.g., VND, USD)
valuestringYesEncoded ancillary value

Sample Response​

{
"system": "VN",
"status": true,
"baggages": [],
"ancillaries": [
{
"code": "MEAL",
"name": "Meal",
"route": "HANSGN",
"prices": [
{
"passengerType": "ADT",
"price": 150000,
"currency": "VND",
"value": "eyJ2YWx1ZSI6ICJNRUFMIiwgInByaWNlIjogMTUwMDAwfQ=="
},
{
"passengerType": "CHD",
"price": 120000,
"currency": "VND",
"value": "eyJ2YWx1ZSI6ICJNRUFMIiwgInByaWNlIjogMTIwMDAwfQ=="
}
]
},
{
"code": "INS",
"name": "Travel Insurance",
"route": "HANSGN",
"prices": [
{
"passengerType": "ADT",
"price": 200000,
"currency": "VND",
"value": "eyJ2YWx1ZSI6ICJJTlMiLCAicHJpY2UiOiAyMDAwMDB9"
}
]
}
],
"error": null,
"description": null,
"trackingId": "abc123",
"trackingTime": "2025-07-01T06:57:26.6596055+00:00"
}

Ancillary & Price Structure​

  • Each ancillary represents an optional service (e.g., meal, insurance, priority check-in) that can be purchased for the selected flight.
  • The prices array lists the cost for each passenger type (ADT, CHD, INF). The value field is an encoded object used for subsequent booking or add-ancillary requests.

Error Codes​

This endpoint may return the following error codes:

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.
  • The endpoint is protected against tampering with flightValue and airline.

Validation Questions​

  • Are there any restrictions on which ancillaries can be combined?
  • Is the value field always required for subsequent add-ancillary requests?
  • Are there time limits for when ancillaries can be added before departure?

For integration support, see Contact Support.