A loyalty number can look like a minor field on a flight checkout page. In practice, handling it correctly requires decisions about passenger identity, airline relationships, offer construction, order records, and the evidence a booking platform can safely show. An account entered by one traveler must not silently become another traveler’s account. A corporate identifier must not be treated as a personal frequent-flyer number. And an API response that accepts an identifier must not become a promise that the airline validated membership or will award miles.
This guide explains how to design flight booking api integration around those distinctions. It focuses on the journey from account collection to search, offer inspection, order creation, and later changes. The aim is an auditable workflow that improves the traveler experience without asserting airline benefits that the available response cannot establish. The Duffel documentation is used as one limited, current implementation reference, not as a universal specification for every airline or distribution connection. Where the supplier offers only partial visibility, the portal should preserve uncertainty as an explicit status. This becomes particularly important when an operations team services a booking long after purchase.
Define What the Loyalty Account Represents
Before mapping any API payload, decide what the entered identifier actually represents. A personal frequent-flyer account belongs to an individual traveler within an airline loyalty programme. A corporate reward or business travel account belongs to a participating organization or business arrangement. Both may be relevant to the same trip, but they have different owners, eligibility rules, data shapes, and points of attachment in an integration.
Personal Frequent-Flyer Memberships
A personal membership is associated with the passenger who expects the airline to recognize it. The reservation contact, payer, agency employee, and traveler may be four different people. Attaching the payer’s number to every passenger because it was saved in a customer profile would be a serious attribution error. The application needs a passenger-specific association, even if one account holder purchases tickets for an entire family or team.
Corporate Loyalty and Business Reward Identifiers
A corporate programme may credit an organization or recognize an approved business relationship. It is not simply a collection of employees’ frequent-flyer accounts. The enterprise may have an administrative owner, enrolment conditions, approved routes, participating airlines, and internal travel policy requirements. Whether an employee’s personal account can be supplied as well is a separate programme and supplier question, not a feature you can assume from a successful request.
The corporate identifier may also need to appear in a different part of a supplier request. In the current Duffel corporate loyalty programme guide, participating corporate schemes are passed through an airline-keyed private_fares object in the offer request. Specific programmes require either a tour_code or a tracking_reference. That is distinct from Duffel’s passenger-level personal loyalty account array.
Build a Reliable Traveler-to-Account Association
The critical design question is not merely whether the API accepts a number. It is whether the number has been joined to the correct traveler at every stage. Start with your own stable traveler identifier in the booking application. Link that identifier to a particular passenger entry in the offer request, then retain the supplier passenger reference when the returned offer creates one. Positional assumptions, such as “the first account belongs to the first passenger,” are fragile when passenger lists are edited or rebuilt.
Use separate records for traveler profiles, trip passengers, and loyalty associations. A saved traveler profile can suggest an account during a future search, but that suggestion still requires selection or confirmation for the current passenger and airline context. The trip-passenger record should capture the name and other identity fields that were actually sent to the supplier, plus the association chosen for that specific search.
Names, Passenger References, and Ownership Checks
Collect the passenger name in the format the selected provider requires when loyalty information is supplied. The Duffel personal loyalty guide describes including the traveler’s given and family names when searching with loyalty accounts, rather than waiting until order creation to provide them. Its offer-passenger update flow similarly identifies a particular offer passenger, with that passenger’s name and account details.
A platform should distinguish three identifiers: its own traveler ID, its own booking-passenger ID, and the supplier’s passenger ID. Keep the mapping explicit. The contact email, the logged-in user, and the lead traveler designation are not substitutes for it. For group bookings, use a per-passenger review screen showing the name, selected programme, and masked membership value. Make the default state “no account selected” where confidence is insufficient.
If a traveler disputes the ownership of a membership, stop automatic reuse until the association is corrected. Where the supplier exposes no membership-verification capability, the platform can verify that the user supplied or confirmed the value, but it cannot independently certify that the airline recognizes the account as belonging to that traveler. Label those states differently in support tools and audit records.
Airline Routing Is Part of Account Routing
Flight shopping involves airline codes in several roles: the airline being searched, the carrier marketing a flight, the operator of a flight, and the programme to which a traveler belongs. They need not be identical. Keep each role explicit in the itinerary model instead of treating the first airline code on a screen as the universal destination for loyalty details.
For Duffel’s documented personal flow, an account object includes airline_iata_code and account_number. Duffel says it sends the supplied accounts to appropriate airlines. That statement describes Duffel’s routing behavior; it should not be reinterpreted as evidence that every airline or codeshare combination recognizes every account. Other provider connections may expose different routing rules or may not support this input at all. Confirm each integration’s documented field and eligibility scope before enabling it in production.
Map Account Types to the Correct Request Fields
Many implementation defects originate in an overly generic internal field. One database column named loyalty_id cannot explain whether the value belongs to a passenger, a company, a programme, or an airline. Normalize data internally, then create a supplier-specific adapter that converts it into the supported request structure. The adapter should reject incompatible combinations rather than silently dropping them or moving them into the wrong field.
The table below describes the integration decisions for the two account categories. It is intentionally scoped to Duffel’s current documented flows, with general quality controls that remain useful when evaluating a different provider. It is not a directory of airline entitlements, and it does not establish programme eligibility.
| Decision | Personal Frequent-Flyer Account | Corporate Reward Account | Implementation Check |
|---|---|---|---|
| Account owner | Individual trip passenger | Participating organization | Confirm the owner and authorized trip context |
| Request location | Passenger loyalty_programme_accounts |
Offer-request private_fares, keyed by airline |
Do not interchange the structures |
| Programme routing | airline_iata_code with account number |
Programme-specific airline key and required parameter | Check current supplier and airline requirements |
| Supported updates | Offer-passenger update in the documented Duffel flow | Corporate details are documented on offer request | Do not assume identical update endpoints |
| Response evidence | Inspect passenger account data and refreshed offer | Inspect offer private_fares information |
Recorded data is not membership validation |
| After booking | Reconcile the relevant passenger and order record | Reconcile the business reference and order context | Do not promise rewards or future posting |

Inspect Offers Instead of Assuming Benefits
A correct request is only the beginning. After searching, inspect what the provider returned. The personal loyalty guide explains that available airline pricing or service differences appear in the existing offer model and that offer passenger information can include accounts that were sent onward. The corporate guide directs integrators to inspect the offer’s private_fares property for corporate loyalty information. These are evidence points within a supplier response, not independent proofs of the customer’s programme status.
Keep a record of the selected offer ID, its supplier passenger IDs, the account associations used for the search, relevant airline codes, the retrieved price and conditions, and the response fields you actually observed. If a property is absent, describe it as absent rather than inferring a rejection or an acceptance. If the response shows a reference, describe it as supplied or represented, not as authenticated membership.
Searching With Accounts Versus Updating an Offer
In Duffel’s personal flow, you may include loyalty_programme_accounts within each passenger object when creating an offer request. Alternatively, you can start without an account and update a specific offer passenger through the documented offer-passenger endpoint. The guide notes an important limitation: its stated ticket-price discount visibility applies to the latter flow. A system should therefore not compare these flows as though they produce identical price evidence.
After updating one offer passenger, repeat the supported operation for any other passenger who needs a different account. Then retrieve the offer again, because its price may change. Present the refreshed price, available services, and current conditions to the traveler before booking. Do not retain a checkout amount from the original offer while silently showing loyalty information added afterward.
Corporate loyalty follows a different documented path. Duffel’s corporate guide shows airline-keyed private_fares input in an offer request, with United Airlines PerksPlus using tour_code and American Airlines AAdvantage Business using tracking_reference. Other entries in that guide have their own airline and parameter requirements. These examples are narrowly about supported request shapes; they do not establish that entering an identifier automatically creates a private fare, discount, or company reward.
Explain Evidence Levels in the Interface
Use precise, observable labels. “Saved in traveler profile” means only that the application stored the value. “Included in search request” means the application assembled and sent a field. “Represented in returned offer” means an expected response field was visible. “Included in the booked order” should be used only when an order response or an authoritative booking record actually shows the information in a form the integration can interpret.
Worked Hypothetical Example: Two Travelers, One Company
Consider an entirely fictional corporate trip from New York to Chicago for two employees, Avery Chen and Morgan Lee. Both travelers have separate personal memberships in the airline programme selected for this example. Their employer also supplies an American Airlines AAdvantage Business reference. The travel administrator wants the company reference considered for the trip while each traveler retains their own personal frequent-flyer association. This scenario illustrates data handling; it does not predict an airline fare, reward, or acceptance result.
First, the portal creates two internal trip-passenger records. Avery’s record points to Avery’s confirmed personal account, represented in a test fixture as [AVERY-MEMBER]. Morgan’s points to [MORGAN-MEMBER]. The employer-level record contains [COMPANY-REFERENCE] and a business owner. Bracketed values are placeholders, not live account credentials or statements about valid membership formats. No number is copied from one employee to the other.
Second, assuming supplier support for combining these account types, the flight-search adapter constructs the passenger array with each traveler’s name and an individual loyalty_programme_accounts entry using the appropriate personal airline code. Separately, for a supported American Airlines corporate request, it places the employer reference under the AA key in private_fares as tracking_reference. The platform does not put the business reference into either passenger’s personal account array. It records which field came from which owner.
Third, after the provider returns offers, the booking application inspects the passenger associations and the offer’s relevant corporate information. Suppose the returned offer shows the submitted personal-account representations and a corporate reference but no explicit membership verification. The platform marks those fields “represented in offer,” retains the observed offer price, and leaves validation status “not established.” It does not state that Avery or Morgan gained priority services, that the employer qualified for a special fare, or that either account will earn points.
Fourth, the administrator selects an offer and checks names and account assignments before order creation. In Duffel’s documented personal flow, loyalty data already included in the offer does not need to be provided again when creating the order. The platform still reconciles the resulting order with the chosen offer and records the returned passenger references and whatever loyalty-related fields are actually available. Any missing order representation becomes a review item, not an invented success.
Finally, imagine Morgan’s name needs correction before ticketing. The portal stops treating the earlier mapping as current, rechecks the supplier’s supported change path, and confirms the personal account remains tied to the corrected passenger record. It then reexamines the current offer or order evidence as applicable. The hypothetical outcome is a documented association and a defensible status message, not a guaranteed airline reward.
Carry the Association Through Order Creation
Offers are shopping artifacts; orders are booking artifacts. A loyalty association observed during search must survive the transition without being accidentally assigned to the wrong person. Preserve both the last accepted offer snapshot and the order response, and map their passenger identifiers to your application’s trip passengers. Do not rely on display order alone because supplier identifiers and response shapes can differ across lifecycle stages.
Duffel’s personal loyalty documentation states that creating an order does not require resending the account data already supplied in the relevant offer flow. That is a property of this documented integration, not a rule for every booking API. For another supplier, check whether account information belongs on a shopping request, a passenger update, an order request, a servicing operation, or some combination. Never add undocumented fields to an order request merely to increase confidence that an identifier was carried forward.
Reconcile What the Order Actually Says
After order creation, compare traveler names, supplier passenger references, airline routing, and any exposed account information with the selected offer. If the response schema lacks a loyalty field, record that visibility limitation. It may be reasonable to ask the supplier or airline for clarification through an approved support process, but the application should not imply that a hidden record was verified. Keep order fulfillment and account validation as separate operational states.
The corporate guide expressly warns that suppliers may not validate programme information consistently during search or order creation and that invalid values can prevent rewards. It also describes a specific Lufthansa Group behavior: an unrecognized corporate client ID is rejected when an order is created. This is a documented exception for that pathway, not evidence that all airlines perform order-stage corporate validation. Model provider-specific errors distinctly from general account-field acceptance.
Recheck Loyalty Data After Passenger Changes
Passenger changes are especially risky because a previously correct association can become incorrect without the membership value itself changing. A name correction, passenger replacement where permitted, new passenger added to a group, booking split, itinerary change, cancellation, or supplier-driven reissue may affect the record that originally linked an account to a person. Make loyalty reinspection part of the servicing workflow rather than treating it as a one-time checkout task.
When the application receives a passenger-related change, mark the affected loyalty association as requiring review. Reconcile your internal traveler ID with the new or updated supplier passenger reference, review the current passenger name, and verify the intended airline or programme routing. Determine whether the provider permits the account to be resubmitted, amended, or inspected at that stage. Do not presume that the original offer update endpoint remains available after booking.
Change Controls and Clear Handoffs
For an automated change, preserve the before-and-after mapping and the supplier operation result. For a manual change, place the booking in an operations queue with the affected passenger, account type, field last observed, and unresolved question. If an airline or provider must handle the correction directly, give the support agent enough context to request guidance without exposing full membership numbers in ordinary notes.
After the change, examine the latest available order or servicing response and update only the statuses it supports. If the supplier does not expose a refreshed loyalty representation, show “requires confirmation” or an equivalent neutral state. A successful name change does not itself prove that a loyalty association was preserved, and a successful loyalty-field update does not prove that future mileage credit is assured.
Collect Less Data and Protect It Throughout the Lifecycle
Loyalty account identifiers are personal or business-associated data. Collect them only for a defined booking purpose, explain why they are requested, and keep them separate from broader customer analytics unless another lawful basis and notice apply. The minimum useful record might contain account type, programme or airline code, masked display value, an encrypted account identifier where reuse is justified, owner reference, consent or authorization context, and timestamps relevant to the booking.
Prefer tokenization or field-level encryption for values that must be retrieved. Use transport encryption, least-privilege access, carefully scoped supplier credentials, and a secrets manager for API tokens. Avoid placing complete account numbers in URLs, browser analytics, client-side error reporting, application logs, ticket comments, screenshots, or unprotected support exports. The developer console and monitoring pipeline deserve the same scrutiny as the main database.
Test for Correctness, Not Just Successful API Responses
A useful integration test proves that associations remain accurate under realistic workflows. Start with a single passenger and a single personal membership, then expand to multiple travelers with different accounts, missing accounts, conflicting programme selections, changed names, and a corporate reference. Inspect outbound request structure and inbound representations separately. Test validation messages for incomplete or unsuitable input without claiming to authenticate membership against an airline.
Include contract tests for fields that differ between personal and corporate flows. A personal account must remain inside its own passenger’s account collection. A supported corporate identifier must use the airline key and parameter documented for that programme. Confirm that unsupported combinations produce a clear application outcome and do not get silently transformed into a different account type. Pin tests to the supplier API version and revisit them when documentation changes.
Acceptance Criteria for a Booking Team
The core acceptance condition is traceability: for each account field sent, the team can identify its owner, its original source, the trip passenger or company association, the airline routing decision, and the offer or order observation that followed. Changing one passenger must not alter another passenger’s membership. Refreshing an offer after a supported update must replace stale price evidence. An unavailable response field must not be displayed as an airline rejection or as a completed validation.
For supplier-specific testing, Duffel’s personal guide describes a test-airline setup for demonstrating loyalty-related responses. Keep such behavior isolated to the test environment. A sandbox discount or luggage allowance is useful for checking that a UI can render changed offer information; it cannot justify promises about live carriers. For corporate data, also test the distinction between a reference being accepted into a search and its subsequent treatment by the airline.
Make the Traveler Experience Accurate and Understandable
Place benefit language next to evidence. If an offer actually displays a particular baggage allowance or price, show that offer information with the relevant conditions and current price. If the application merely submitted a loyalty identifier, say that it was submitted. Avoid slogans such as “status verified” or “earn guaranteed miles” unless a separate authoritative process genuinely supports those claims. This reduces avoidable disputes and gives support teams an accurate starting point.
Flight booking api integration is more trustworthy when account ownership, request routing, supplier response evidence, and change management form one consistent workflow. TravelTech365 teams designing booking engines, agency portals, or corporate travel interfaces can use that workflow as a requirements baseline: model personal and business accounts separately, bind every personal membership to the right passenger, inspect current offers and orders, safeguard only necessary data, and recheck associations whenever the booking changes. The result is a stronger foundation for loyalty-aware shopping without promising what an airline has not confirmed.
