Skip to main content

Enrich Endpoint

Re-checks a searched itinerary against the provider and returns it with baggage allowance, refund/change rules and a per-passenger price breakdown attached.

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

Enrich is optional. Use it when you want to show fare rules and baggage on the flight detail screen before the customer commits. It does not create a session you can book with — only Pricing does that.

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
}

Response

data is an array of enriched solutions, sorted ascending by pricingDetails.grand_total (cheapest first). Each entry has the same shape as a Search solution, plus the fields below.

FieldTypeDescription
pricingDetailsObjectPer-passenger-type price breakdown. See below.
flightDetailsArrayOne pre-formatted summary per journey. See below.
segmentBaggageMappingListArrayBaggage allowance per segment, with human-readable messages.
segmentRefundChangeRuleMappingListArrayRefund/change rules per segment, with human-readable messages.

pricingDetails

FieldTypeDescription
adults.countIntegerNumber of adults.
adults.fareFloatPer-adult base fare, display currency.
adults.taxFloatPer-adult tax, display currency.
adults.totalFloat(fare + tax) × count.
children / infantsObjectSame structure, present only when count > 0.
total_passengersIntegerSum of all passenger counts.
grand_totalFloatSum of all passenger-type totals.
currency_codeStringCurrency of the values above.
note

At the Enrich stage pricingDetails reflects the searched fare. The authoritative, margin-applied and bookable price comes from Pricing, which returns both display and THB values.

flightDetails[]

FieldTypeDescription
departure_datetime_str / arrival_datetime_strStringPre-formatted date-times.
date_differenceIntegerDays between departure and arrival dates.
date_difference_strStringe.g. (+1).
total_transfer_countIntegerNumber of stops.
total_transfer_count_strStringDirect or 1 Transfer.
total_durationIntegerMinutes.
total_duration_strStringe.g. 4h 15m.
cabin_class / cabin_class_nameStringCabin code and label.
flight_strStringe.g. Thai Airways TG403.

Baggage allowance

segmentBaggageMappingList[].passengerBaggageAllowanceMapping is keyed by passenger type (ADT, CHD). Each entry carries the raw allowance plus these derived fields:

FieldTypeDescription
hasCheckedBaggageBooleanWhether checked baggage is included.
hasHandBaggageBooleanWhether hand baggage is included.
baggageMessage["Checked Baggage"]Stringe.g. 1 x 20 KG Checked baggage included.
baggageMessage["Carry-on Baggage"]Stringe.g. 1 x 7 KG Hand baggage included.

Refund / change rules

segmentRefundChangeRuleMappingList[].refundChangeRuleMap is keyed by passenger type (ADT, CHD). Each rule inside refundRuleAllUnusedList and changeRuleOutUnusedList gains a formattedMessage field, for example:

  • Refund allowed for free (Before 24 hours)
  • Change allowed with fee (approx. THB 1500) (Between 2-24 hours)
  • Not allowed

Sample Response

Truncated.

{
"result": 1,
"message": "success",
"data": [
{
"solutionId": "HITIT_9f2c1b7d4e8a3f6c0d5b2a91e7c48d63",
"provider": "HITIT",
"currency": "THB",
"journeyList": [ ],
"pricingDetails": {
"adults": {
"count": 1,
"fare": 7200.00,
"tax": 1250.00,
"total": 8450.00
},
"total_passengers": 1,
"grand_total": 8450.00,
"currency_code": "THB",
"currency_symbol": "$"
},
"flightDetails": [
{
"departure_datetime_str": "Thu, Oct 01 2026, 08:30:00",
"arrival_datetime_str": "Thu, Oct 01 2026, 12:00:00",
"date_difference": 0,
"date_difference_str": "(+0)",
"total_transfer_count": 0,
"total_transfer_count_str": "Direct",
"total_duration": 150,
"total_duration_str": "2h 30m",
"cabin_class": "Y",
"cabin_class_name": "Economy Class",
"flight_str": "Thai Airways TG403"
}
],
"segmentBaggageMappingList": [
{
"passengerBaggageAllowanceMapping": {
"ADT": {
"baggageAmount": 1,
"baggageWeight": 20,
"baggageWeightUnit": "KG",
"carryOnAmount": 1,
"carryOnWeight": 7,
"carryOnWeightUnit": "KG",
"hasCheckedBaggage": true,
"hasHandBaggage": true,
"baggageMessage": {
"Checked Baggage": "1 x 20 KG Checked baggage included",
"Carry-on Baggage": "1 x 7 KG Hand baggage included"
}
}
}
}
],
"segmentRefundChangeRuleMappingList": [
{
"refundChangeRuleMap": {
"ADT": {
"refundRuleAllUnusedList": [
{
"canRefund": true,
"refundFee": 0,
"ruleStartTime": null,
"ruleEndTime": 24,
"timeUnit": "HOUR",
"formattedMessage": "Refund allowed for free (Before 24 hours)"
}
],
"changeRuleOutUnusedList": [
{
"canChange": true,
"changeFee": 1500,
"ruleStartTime": 2,
"ruleEndTime": 24,
"timeUnit": "HOUR",
"formattedMessage": "Change allowed with fee (approx. THB 1500) (Between 2-24 hours)"
}
]
}
}
}
]
}
]
}

Next Step

Call Pricing with the same solution_id to lock in the price and obtain the session_id needed for checkout.