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β
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | System code (e.g., VN, VJ, 1A) |
| flightValue | string | No | Encoded flight value from Search Result |
| airline | string | No | Airline code (IATA 2-letter, e.g., VN, VJ, AF) |
Example Request:
{
"system": "VN",
"flightValue": "eyJmYXJlRGF0YUlkIjoxLCJvcHRpb25JZCI6MCwiZmxpZ2h0SWQiOjAsImxlZyI6MCwiYWlybGluZSI6IlZOIiwg...",
"airline": "VN"
}
Request Constraints & Business Rulesβ
systemandflightValuemust match the values from the flight search response.- If you want to add ancillaries to an existing booking, you should use the
flightValuefrom the Retrieve Booking API response as theflightValuein the get ancillaries API request. This ensures the most up-to-date and valid flight context. airlinemust be a valid IATA code for the selected flight.- Only available after a successful flight search.
Response Structureβ
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | Name of the airline system |
| status | boolean | No | true if successful, false if failed |
| error | ErrorCode (object) | Yes | Error details (if any) |
| description | string | Yes | Error description (if any) |
| trackingId | string | Yes | Tracking ID for request logs |
| trackingTime | string (date-time) | Yes | Time for request tracking |
| ancillaries | array of Ancillary | Yes | List of available ancillary services |
Ancillary Objectβ
| Field | Type | Nullable | Description |
|---|---|---|---|
| code | string | Yes | Ancillary service code |
| name | string | Yes | Service name (e.g., Meal, Insurance) |
| type | string | Yes | Service type (WCHR-Xe lΔn, MEAL-Δn uα»ng, OTHER-LoαΊ‘i khΓ‘c) |
| route | string | Yes | Route the service applies to (e.g., HANSGN) |
| prices | array of PriceAncillaryType | Yes | Price details for each passenger type |
PriceAncillaryType Objectβ
| Field | Type | Nullable | Description |
|---|---|---|---|
| passengerId | string | Yes | Passenger ID (for post-booking queries) |
| passengerType | string | Yes | Passenger type (ADT, CHD, INF) |
| price | number | No | Total price for this passenger type |
| currency | string | Yes | Currency (e.g., VND, USD) |
| value | string | Yes | Encoded ancillary value |
Example 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
pricesarray lists the cost for each passenger type (ADT, CHD, INF). Thevaluefield is an encoded object used for subsequent booking or add-ancillary requests.
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.
- The endpoint is protected against tampering with
flightValueandairline.
Validation Questionsβ
- Are there any restrictions on which ancillaries can be combined?
- Is the
valuefield 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.