Skip to main content

Ancillary Endpoint

Returns purchasable add-ons — extra baggage and, for Hitit, meals — for a searched itinerary, priced in your display currency with margin already applied.

  • Endpoint: /api/v1/flights/ancillary
  • Method: POST

Ancillary is optional. The response shape differs per provider, so branch on the provider you saw in Search.

Headers

HeaderValueRequiredDescription
Partner-Access-TokenBase64 StringYesYour encrypted AES-256 time-sensitive token.
X-CurrencyCurrency CodeOptionalDisplay currency. Defaults to your partner currency, then THB.
Accept-LanguageLanguage CodeOptionale.g. en, th, my.
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes

Payload Parameters

ParameterTypeRequiredDescription
solution_idStringYesThe solutionId from Search.
adultsIntegerOptionalDefault 1.
childrenIntegerOptionalDefault 0.
infantsIntegerOptionalDefault 0.

Sample Payload

{
"solution_id": "HITIT_9f2c1b7d4e8a3f6c0d5b2a91e7c48d63",
"adults": 1,
"children": 0,
"infants": 0
}

The session_id

Every response carries a session_id. You must echo it back inside each passenger's ancillary object at Checkout Confirm:

"ancillary": {
"ancillary_id": "BAG_XBAG_20",
"session_id": "HITIT_67f4c0b21e2b8d3a5c60f7c9"
}

The server re-derives the add-on price from this session at booking time. Prices submitted by the client are never trusted.

Response — Hitit

data is an object with baggage and meals arrays.

FieldTypeDescription
ancillary_idStringIdentifier to send at confirm, e.g. BAG_XBAG_20, MEAL_VGML.
codeStringProvider SSR code.
nameStringDisplay label, e.g. Extra Baggage 20kg.
weightIntegerBaggage only. Weight in kg.
priceFloatBase converted price in display currency (no margin).
display_priceFloatCustomer-facing price, margin applied, display currency.
thb_priceFloatSystem price in THB.
currencyStringDisplay currency.
provider_price / provider_currencyFloat/StringRaw amount quoted by the airline.
session_idStringAncillary session, at the top level of data.
{
"result": 1,
"message": "success",
"data": {
"baggage": [
{
"ancillary_id": "BAG_XBAG_20",
"code": "XBAG",
"weight": 20,
"name": "Extra Baggage 20kg",
"price": 1200.00,
"display_price": 1380.00,
"thb_price": 1380.00,
"currency": "THB",
"provider_price": 32.00,
"provider_currency": "USD"
}
],
"meals": [
{
"ancillary_id": "MEAL_VGML",
"code": "VGML",
"name": "Vegetarian Meal",
"price": 350.00,
"display_price": 402.50,
"thb_price": 402.50,
"currency": "THB",
"provider_price": 9.50,
"provider_currency": "USD"
}
],
"session_id": "HITIT_67f4c0b21e2b8d3a5c60f7c9"
}
}

Response — FlightRoute

data.baggage is an object keyed by segment, not a flat array. The key is the segment identifier the add-on applies to.

FieldTypeDescription
id / ancillary_id / codeStringProvider aux identifier. Send ancillary_id at confirm.
typeStringBAG.
name / descriptionStringe.g. 20kg (1 piece).
weightIntegerWeight in kg.
priceFloatCustomer-facing price, margin applied, display currency.
currencyStringDisplay currency.
original_price / original_currencyFloat/StringRaw provider amount.
segment_idsArrayRaw provider segment IDs the add-on covers.
passenger_typesArrayApplicable passenger types, e.g. ["ADT","CHD"].
{
"result": 1,
"message": "success",
"data": {
"baggage": {
"SEG1-SEG2": [
{
"id": "AUX10023",
"ancillary_id": "AUX10023",
"type": "BAG",
"name": "20kg (1 piece)",
"description": "20kg (1 piece)",
"code": "AUX10023",
"weight": 20,
"price": 1450.00,
"currency": "THB",
"original_price": 38.00,
"original_currency": "USD",
"segment_ids": ["SEG1", "SEG2"],
"passenger_types": ["ADT", "CHD"]
}
]
},
"session_id": "FR24_67f4c0b21e2b8d3a5c60f7d1"
}
}

Response — Fliggy

data is a flat array of segment-to-ancillary mappings. Each entry carries its own session_id.

FieldTypeDescription
ancillary.baggageAncillary.priceFloatCustomer-facing price in display currency.
ancillary.baggageAncillary.thb_priceFloatSystem price in THB.
ancillary.baggageAncillary.provider_priceFloatRaw provider amount.
ancillary.baggageAncillary.currency_codeStringDisplay currency.
session_idStringAncillary session, on each element.
{
"result": 1,
"message": "success",
"data": [
{
"segmentNo": 1,
"ancillary": {
"baggageAncillary": {
"price": 1380.00,
"thb_price": 1380.00,
"provider_price": 32.00,
"currency_code": "THB"
}
},
"session_id": "67f4c0b21e2b8d3a5c60f7e3"
}
]
}

Multiple Ancillaries Per Passenger

At confirm, a passenger can carry more than one add-on. Two shapes are accepted:

"ancillaries": { "0-0": "BAG_XBAG_20", "0-1": "MEAL_VGML" }
"ancillaries": [ { "ancillary_id": "BAG_XBAG_20" } ]

The object form is preferred — the key is the journeyIndex-segmentIndex the add-on applies to ("0-0" is the first segment of the first journey). The singular ancillary object is also still accepted and is treated as the session-carrying entry.

Next Step

Continue to Seat Map, or go straight to Checkout.