Travel API Sessions and Offer Identifiers. A traveler can discover a flight, select a hotel rate, and begin checkout without possessing anything that guarantees a booking. Travel APIs return identifiers with different purposes and lifetimes. Some connect the website's own search history; others help a provider diagnose a request, identify an offer, authorize a short-lived workflow step, or retrieve a completed reservation. Treating these values as interchangeable creates expired selections, misleading prices, duplicate bookings, and difficult support investigations. This guide explains how to model each value, preserve the right evidence, and keep the customer journey accurate when inventory changes.
Why identifier meaning matters
Use travel API session expiry to describe the general design concern, not to imply that every integration exposes a session identifier or one universal timeout. A provider's resource model determines which value expires, what remains retrievable, and when a new search or price check is required.
The practical design rule is to attach a type, owner, scope, status, and permitted use to every identifier. A string that looks valid is not necessarily current, accessible to this customer, or suitable for booking.
Seven identifier classes to keep separate
| Class | Purpose | What it cannot prove | Handling principle |
|---|---|---|---|
| Local search request | Connects criteria, filters, and display events within the website. | Provider availability or permission to book. | Generate internally; scope to tenant and user journey. |
| Provider trace | Helps correlate requests and support diagnostics. | A live shopping session or confirmed reservation. | Log with operation and timestamp; never treat as a booking key. |
| Provider session | Maintains provider-specific workflow state when supplied. | A fixed lifetime across suppliers. | Respect documented context and expiry behavior. |
| Offer or rate ID | Identifies a specific priced choice or inventory candidate. | Continuing price, baggage, or availability. | Validate freshness and binding before proceeding. |
| Short-lived link | Enables a permitted next API step, such as hotel Price Check or booking. | A permanent endpoint or public customer URL. | Keep server-side and replace when invalid. |
| Payment authority | Records the approved amount and permitted payment operation. | That the supplier created a booking. | Track authorization, capture, void, and reconciliation independently. |
| Booking reference | Identifies or retrieves a reservation after a booking attempt. | That every room or service is finalized without status verification. | Store durable references and verify final state. |
Understand the provider-specific boundaries
Flight offers are priced resources, not promises
In Duffel's Offers documentation, an offer represents flights available from an airline at a particular price. It contains slices and segments, and the offer includes an expires_at value. The documentation says offers typically expire within 30 minutes, while the actual timestamp governs that offer. Therefore, a local fixed countdown cannot replace the returned expiry.
The same documentation distinguishes the offer identifier from related values such as pricing, available services, and payment-method details. Application design should preserve the exact offered itinerary and selected services alongside the supplier's offer ID. A new offer can refer to comparable travel without being commercially equivalent.
Hotel shopping links progress through separate steps
Expedia Group Rapid Shopping documentation describes rate and availability responses and a Price Check operation that validates a selected rate. If the price matches, Price Check returns a booking link; if the price changes, it returns updated price details and a booking link; if unavailable, it directs the workflow toward shopping again.
Rapid's tokenized request links expire after a short period. Its guidance warns against retaining them for long-term reuse and notes that an HTTP 503 from a token link can indicate expiration. The Rapid Booking documentation also describes short-lived booking links obtained from Price Check. Neither statement establishes a reusable lifetime for every customer, property, or endpoint.
Errors need context, not just a status code
Rapid's Common error responses document distinguishes expired links, unavailable inventory, invalid inputs, rate limits, and uncertain booking outcomes. For example, a 410 may concern an expired link or sold-out inventory, while a booking timeout can occur before or after itinerary creation. Build decisions from the operation, error type, known request state, and retrieval results, not the HTTP number alone.
Illustrative case: the ID-755 travel journey
Everything in this scenario is illustrative. ID-755, its tenant, amounts, dates, identifiers, records, test outcomes, and workflow events are invented to demonstrate architecture. They do not describe real customers, provider transactions, contractual terms, or measured supplier performance.
The fictional tenant is north, the environment is test, and the selling currency is GBP. At 09:00 UTC, the website creates local search S11 for one traveler. It also retains diagnostic trace TR-6 for an outbound provider request. These two values appear on the same timeline but serve different authorities: S11 belongs to the website; TR-6 is diagnostic and cannot reopen an offer.
The initial flight selection, OF-1, shows GBP 182 and expires at 09:18 UTC in this invented fixture. The customer clicks the booking action at 09:19 UTC. The server blocks submission before sending an order request because the recorded expiry has passed. It refreshes shopping and receives OF-2 at GBP 196 with a baggage inclusion different from OF-1. The application cannot silently substitute this new offer. It must explain the price increase and baggage difference, then obtain new consent.
| Time | Event | Evidence | Decision |
|---|---|---|---|
| 09:00 | Local search created | S11; north/test/GBP | Permit search display. |
| 09:00 | Provider diagnostic recorded | TR-6; request correlation | Store for troubleshooting only. |
| 09:02 | First flight offer selected | OF-1; GBP 182; expiry 09:18 | Show offer with freshness context. |
| 09:19 | Customer clicks continue | OF-1 expired one minute earlier | Block order submission. |
| 09:20 | Fresh flight offer returned | OF-2; GBP 196; baggage changed | Show differences and request consent. |
| 09:21 | Customer reviews new terms | Consent event linked to OF-2 | Proceed only if the new choice is accepted and remains valid. |

Extending ID-755 into hotel shopping
The same fictional journey includes a hotel selection. The shopping response supplies a tokenized Price Check link, represented locally as P-17. The server follows that link to validate the displayed room and rate. Successful Price Check supplies a different short-lived booking link, represented as C-22. These labels are internal fixture handles, not examples of Expedia Group's actual identifier format.
P-17 is authorized for the Price Check step; C-22 is authorized for a subsequent booking attempt under the checked details. They are not interchangeable. A browser should receive an opaque local selection token rather than either provider link. The backend resolves that token only after checking the authenticated user, tenant, environment, intended operation, and the current price-check result.
| Handle | Origin | Permitted operation | Customer exposure | End condition |
|---|---|---|---|---|
| P-17 | Shopping rate selection | Server-to-provider Price Check | Never reveal underlying URL | Used, expired, or superseded |
| C-22 | Successful Price Check | Server-to-provider booking attempt | Never reveal underlying URL | Consumed, expired, or superseded |
| SEL-755 | Website selection store | Resolve permitted checkout state | Opaque local handle only | Checkout completion or local invalidation |
If Price Check reports a changed amount, the booking step must wait for an updated customer decision. If the selected room is unavailable, shopping resumes. If a tokenized link expires, obtain a fresh permitted link through the documented workflow. Replaying the old URL with a modified parameter is not a safe recovery strategy.
Model expiry as state, not only a countdown
A visible countdown is useful orientation, but it is not an authorization mechanism. The backend should validate timestamps at the point of operation using a consistent clock, and reject a stale offer even if an old browser tab still displays a button. Network delays, suspended devices, and a checkout opened on another screen can make the presentation lag the server.
Maintain explicit states such as displayable, selected, refresh_required, reconsent_required, submission_pending, and booked. Keep state transitions atomic so two checkout requests cannot independently consume a single selection. Record the reason for each transition, its timestamp, and the identity authorized to initiate it.
Use a safety margin where appropriate, but do not invent a universal supplier lifetime. For a timestamped flight offer, the supplier's expiry remains decisive; an earlier local cutoff can protect against slow processing. For a hotel token without a specified expiry timestamp, treat validation at the next permitted step and any supplier error as authoritative signals. A cache time-to-live is a local performance choice, not a supplier commitment.
Check the right fields before submission
A freshness gate should inspect tenant scope, provider account, test or live mode, currency, passenger or occupancy criteria, the selected object, its permitted operation, known expiry, and any unaccepted commercial changes. It should also verify that the request has not already become a booking intent. A valid token with the wrong tenant is still invalid for that request.
The critical distinction: expired selection versus uncertain booking
The expired OF-1 case ends before supplier submission. There is no pending provider booking for that click because the local validation blocked it. The safe next action is repricing and explicit consent to a new offer. The website can say the original selection expired; it must not claim the original price remains reserved.
By contrast, fictitious booking intent B-7 was submitted while its applicable selection and authorization were valid, but the create-booking call timed out. The supplier might have completed the reservation despite the missing response. A timeout is uncertainty, not proof of failure. Launching another booking with a fresh reference risks duplicate reservations and payment consequences.
The correct path is an authorized retrieval or reconciliation operation using the original booking reference associated with B-7. For this fixture, the booking request carries an invented client reference REF-755-01; its original value is preserved for lookup. Rapid documents using the booking's affiliate_reference_id to investigate ambiguous outcomes and recommends checking retrieval before treating a booking as failed. Its guidance contains specific timing and retry conditions; those are provider instructions, not generic rules for all APIs.
| Situation | Known fact | Unsafe action | Required recovery |
|---|---|---|---|
| OF-1 stale at click | Expired before any booking submission | Send expired offer or auto-accept OF-2 | Refresh, compare, obtain consent. |
| B-7 create timed out | Request was submitted; outcome unknown | Create another booking under a new reference | Retrieve using REF-755-01 and authorized context. |
| B-7 found booked | Supplier returns confirmed reservation details | Issue another create call | Store confirmed supplier reference and reconcile payment. |
| B-7 still unresolved | No authoritative final outcome | Tell customer failure or success is certain | Show pending status; follow provider recovery or manual investigation. |
Payment authority is a separate boundary
A customer may consent to GBP 196 for OF-2, yet that consent does not itself create a booking or prove a payment has settled. The checkout application should connect the accepted price version to a payment intent or authorization according to its selected payment arrangement. It must track supplier booking status and payment status independently, because their confirmation signals may arrive in different sequences.
For the illustrative flow, a consent record can include accepted offer ID, display snapshot, total GBP amount, included baggage, terms version, event time, and customer action. A separate payment record includes its gateway reference, requested amount, authorization or capture state, and reconciliation status. These are design examples, not claims about a particular provider's required payment fields.
Never allow a browser-supplied amount, an old rate ID, or a diagnostic trace to authorize a charge. The server derives payable amounts from the current accepted selection and configured business rules. A changed amount must follow the checkout's payment-consent requirements. If B-7 remains ambiguous, handle capture, reversal, or reconciliation through the appropriate payment and supplier processes rather than assuming a timeout automatically cancels money movement.
Scope every identifier to its issuing context
A multi-tenant travel platform must reject cross-tenant and cross-account replay. north/test/GBP is not incidental decoration: it is part of the fixture's access boundary. A selection produced under tenant north cannot be redeemed by tenant south; an identifier obtained with test credentials cannot be passed to a live connector; and a GBP display snapshot cannot be silently treated as another settlement currency.
Keep the supplier, integration account, credential environment, tenant, traveler or agency authorization context, and permitted action next to every tokenized value. Validate these fields server-side on every lookup. Do not use a provider identifier alone as a database primary key across suppliers, since two independent systems can use similar string formats or overlapping values.
Travel API authentication and IP allowlisting covers configuring access for approved deployments.
| Field | Illustrative value | Purpose |
|---|---|---|
| journey_id | ID-755 | Connect related website events. |
| local_search_id | S11 | Reconstruct original search criteria. |
| tenant / mode / currency | north / test / GBP | Enforce isolation and display context. |
| provider_resource_type | flight_offer | Prevent token-type confusion. |
| provider_resource_handle | OF-2 | Map to encrypted provider ID server-side. |
| observed_expiry | Fixture-specific timestamp | Apply freshness validation. |
| accepted_snapshot | GBP 196; updated baggage | Show what customer approved. |
| intent_state | reconsent_required | Prevent premature submission. |
Keep short-lived links and sensitive details server-side
Hotel Price Check and booking URLs should live in a protected backend store, not in browser storage, analytics events, emails, support screenshots, or shareable itinerary URLs. A tokenized link may encode authority to perform a provider-specific action. Its exact value deserves protection even when it looks like an ordinary URL.
Encrypt secrets at rest, use TLS in transit, restrict service access, and limit diagnostic retention. When logging provider failures, replace sensitive URLs with stable internal handles, preserve the operation and nonsecret error metadata, and make full raw payload access an explicitly controlled troubleshooting capability. Apply equivalent restrictions to traveler details and payment material.
Error handling that preserves commercial accuracy
Start by classifying the failed operation: search, price verification, booking submission, or retrieval. Then classify the response: definitively rejected, refreshable selection, transient infrastructure fault, or uncertain booking outcome. The same HTTP status can have different consequences depending on this context.
Rapid documents a link.expired error for expired links and records cases where a short-lived token returns HTTP 503. For its booking process, a 504 does not establish that an itinerary was never created. Booking exceptions may require retrieval with the original affiliate reference. The application should retain that reference and surface a pending state while checking.
| Observation | Interpretation | Application behavior |
|---|---|---|
| Offer expiry reached | Selected priced resource no longer usable | Stop submission and refresh choice. |
| Price Check returns changed rate | Commercial terms differ | Show updated breakdown; require acceptance. |
| Token request returns link expiry | Step-specific authority no longer usable | Regenerate through the documented shopping path. |
| Price Check reports unavailable | Selected inventory cannot proceed | Offer different inventory; do not invent continuity. |
| Create booking times out | Final reservation status unknown | Retrieve original intent before another create action. |
| Retrieval confirms booking | Authoritative booking exists | Persist references and present confirmed details. |
| Retrieval remains inconclusive | Further investigation needed | Maintain pending state and route for controlled follow-up. |
Retries should be deliberate. A safe-to-repeat price lookup is not equivalent to repeating a reservation creation. Where a provider supports particular duplicate-handling or same-reference retry rules, follow that provider's documented sequence exactly rather than applying a platform-wide retry policy indiscriminately.
Observable evidence without leaking tokens
Every transition should generate enough evidence for developers, support staff, and auditors to answer five questions: what was selected, which account and environment owned it, what the customer accepted, what was sent, and what authoritative response arrived? Evidence should be attributable without turning logs into a repository of redeemable links.
Connect local search S11 to diagnostic trace TR-6, both offer versions, hotel handles, checkout consent, and any booking intent. Store request times in UTC, state versions, sanitized provider error types, decision reasons, and supplier references where returned. For Rapid investigations, its error guidance identifies the response's Transaction-Id as useful diagnostic evidence; preserve it securely when available.
| Evidence key | Recorded fact | Reviewer conclusion | Disclosure level |
|---|---|---|---|
| EV-01 | S11 created at 09:00; north/test/GBP | Correct local search scope | Internal journey view |
| EV-02 | TR-6 attached to outbound operation | Trace supports diagnostics only | Restricted operations |
| EV-03 | OF-1 expiry 09:18; click 09:19 | Pre-submit block was correct | Sanitized support view |
| EV-04 | OF-2 GBP 196; baggage difference logged | Reconsent required | Customer-visible summary |
| EV-05 | P-17 followed by C-22 | Price Check preceded hotel booking path | Restricted; no raw URLs |
| EV-06 | B-7 retrieval keyed by REF-755-01 | Duplicate prevention path maintained | Restricted booking operations |
Acceptance tests with filled outcomes
The following fixture results are illustrative expected test outcomes, not observed runs against Duffel, Expedia Group, or a production TravelTech365 integration. They show what a controlled test harness should assert. Actual implementation tests must use authorized credentials, provider-supported test paths, and redacted diagnostics.
| Test | Input or simulated event | Expected outcome | Fixture result |
|---|---|---|---|
| T01 | Lookup S11 from north/test | Search returns matching scope and criteria | Pass: scoped read allowed |
| T02 | Use TR-6 as offer ID | Type mismatch rejected before supplier call | Pass: rejected locally |
| T03 | Click OF-1 at 09:19 | Expiry gate stops booking creation | Pass: zero create calls |
| T04 | Replace OF-1 with OF-2 | GBP 14 increase and baggage change disclosed | Pass: consent required |
| T05 | Attempt OF-2 without new consent | Checkout remains blocked | Pass: no payment or order action |
| T06 | Use P-17 for hotel booking | Wrong link purpose rejected | Pass: Price Check only |
| T07 | Follow valid P-17 | Price Check precedes C-22 issuance | Pass: lineage retained |
| T08 | Replay C-22 from another tenant | Scope check denies access | Pass: no supplier request |
| T09 | Submit B-7; simulate timeout | Mark pending; preserve original reference | Pass: REF-755-01 retained |
| T10 | Attempt new-reference retry for B-7 | Duplicate-risk guard blocks create | Pass: retrieval required |
| T11 | Retrieve B-7 as confirmed | Save booking reference; close pending state | Pass: no duplicate booking |
| T12 | Retrieve B-7 inconclusively | Keep pending; route for investigation | Pass: no false failure notice |
Measure these tests at the API boundary, not only through interface messages. Assert the count of create-booking calls, the absence of cross-tenant provider traffic, the exact consent version checked, and the sanitized log fields emitted. A green interface test that still sends an expired or duplicated request is not a successful integration test.
Operational checklist for launch and maintenance
Before connecting a supplier
Document every returned identifier with its issuer, scope, business meaning, required next operation, expiry signal, and permitted storage location. Identify which references are safe for support personnel and which contain sensitive action links. Confirm whether the provider offers an authoritative retrieval path after an interrupted create request.
Before enabling checkout
Verify server-side expiry checks, price and product comparisons, explicit reconsent, idempotent intent handling, and provider-specific recovery rules. Test multiple tabs, interrupted networks, delayed responses, clock boundaries, double clicks, and environment mismatches. Ensure every checkout state has truthful customer-facing copy for expired, changed, pending, confirmed, and unavailable outcomes.
After deployment
Monitor expired-selection rates, price-change frequency, token-link failures, booking timeouts, unresolved retrievals, duplicate-prevention triggers, and supplier reconciliation exceptions. Segment findings by provider operation and tenant without exposing protected identifiers. Investigate shifts against release changes and provider documentation rather than assuming a single timeout value has changed everywhere.
What a dependable customer journey should communicate
The interface should say “This price has expired; checking current options” when a selection lapses before submission. For the illustrative OF-2 refresh, it should show GBP 196 beside the previously displayed GBP 182 and plainly explain the baggage difference. The new continue action should record fresh acceptance, not rely on the previous click.
When B-7 times out after submission, the message should instead indicate that the reservation is being verified and that the traveler should not immediately repeat the purchase. A confirmed reference can be shown only after authoritative retrieval or confirmation. If the outcome remains unresolved, provide a support route and a stable local journey reference without publishing sensitive supplier links.
For TravelTech365 website teams building connected booking portals, the long-term design principle is straightforward: preserve identifier meaning across the entire journey. Search context enables browsing; traces enable diagnosis; offers and rates represent provisional commercial choices; short-lived links authorize specific workflow steps; payment authority governs money; and booking references support durable reservation operations. Keeping those boundaries intact makes expiry behavior understandable, changes consent-driven, and uncertain bookings recoverable without unnecessary duplicates.
Primary documentation and scope
Provider-specific statements in this guide are grounded in Duffel: Offers, Expedia Group Rapid: Shopping, Expedia Group Rapid: Booking, and Expedia Group Rapid: Common Error Responses. The proposed schemas, safeguards, fictional IDs, and acceptance matrix are original integration design examples, not additional provider guarantees. Consult current integration contracts and documentation when implementing production behavior.
