After obtaining a flight offer from the flight offers search API, call the Amadeus Fare Rules endpoint (pricing/v1/shopping/flight-offers/pricing with include=detailed-fare-rules or the dedicated fare rules resource) passing the priced offer.
Parse the fareRules array in the response; each element contains a category (e.g., PENALTIES, REFUNDS, EXCHANGES) and a descriptions array with structured text.
Extract penalty conditions from the PENALTIES category: look for fields indicating whether change/cancel fees apply before or after departure and the monetary amount or percentage.
Normalize penalty amounts to a consistent currency using the offer's currency for display; some rules express penalties as a percentage of the fare rather than a fixed amount.
Summarize the rules in plain language for the traveler: changeable (yes/no/fee amount), refundable (yes/no/fee amount), and the applicable deadline relative to departure.
Cache parsed fare rules alongside the offer; they are tied to the specific fare basis code and should not be reused across different offers.
Known gotchas
Fare rules text is often in semi-structured ATPCO tariff format with airline-specific abbreviations; full natural-language parsing requires significant normalization logic or an LLM step.
Rules can differ per segment within the same itinerary — the most restrictive rule governs the entire booking, which must be surfaced clearly to the traveler.
The Amadeus fare rules endpoint requires the full priced offer payload, not just the offer ID; do not attempt to retrieve rules with only the offer ID.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp