● Travel Never Stops. Neither Do We. 365 Days a Year.

Travel API Sessions and Offer Identifiers

Understand travel API sessions, trace IDs and offer references. Preserve request context and handle expiry using the selected supplier documentation.

Travel planner reviewing itinerary paperwork near a terminal window

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

Identifier roles, authorities, and retention expectations
ClassPurposeWhat it cannot proveHandling principle
Local search requestConnects criteria, filters, and display events within the website.Provider availability or permission to book.Generate internally; scope to tenant and user journey.
Provider traceHelps correlate requests and support diagnostics.A live shopping session or confirmed reservation.Log with operation and timestamp; never treat as a booking key.
Provider sessionMaintains provider-specific workflow state when supplied.A fixed lifetime across suppliers.Respect documented context and expiry behavior.
Offer or rate IDIdentifies a specific priced choice or inventory candidate.Continuing price, baggage, or availability.Validate freshness and binding before proceeding.
Short-lived linkEnables 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 authorityRecords the approved amount and permitted payment operation.That the supplier created a booking.Track authorization, capture, void, and reconciliation independently.
Booking referenceIdentifies 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.

Illustrative ID-755 events and expected decisions, all times UTC
TimeEventEvidenceDecision
09:00Local search createdS11; north/test/GBPPermit search display.
09:00Provider diagnostic recordedTR-6; request correlationStore for troubleshooting only.
09:02First flight offer selectedOF-1; GBP 182; expiry 09:18Show offer with freshness context.
09:19Customer clicks continueOF-1 expired one minute earlierBlock order submission.
09:20Fresh flight offer returnedOF-2; GBP 196; baggage changedShow differences and request consent.
09:21Customer reviews new termsConsent event linked to OF-2Proceed only if the new choice is accepted and remains valid.
Travel operations staff comparing two printed itineraries

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.

Illustrative hotel link lineage and visibility controls
HandleOriginPermitted operationCustomer exposureEnd condition
P-17Shopping rate selectionServer-to-provider Price CheckNever reveal underlying URLUsed, expired, or superseded
C-22Successful Price CheckServer-to-provider booking attemptNever reveal underlying URLConsumed, expired, or superseded
SEL-755Website selection storeResolve permitted checkout stateOpaque local handle onlyCheckout 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.

Contrasting outcomes in the illustrative ID-755 fixture
SituationKnown factUnsafe actionRequired recovery
OF-1 stale at clickExpired before any booking submissionSend expired offer or auto-accept OF-2Refresh, compare, obtain consent.
B-7 create timed outRequest was submitted; outcome unknownCreate another booking under a new referenceRetrieve using REF-755-01 and authorized context.
B-7 found bookedSupplier returns confirmed reservation detailsIssue another create callStore confirmed supplier reference and reconcile payment.
B-7 still unresolvedNo authoritative final outcomeTell customer failure or success is certainShow 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.

Proposed application record for a typed selection
FieldIllustrative valuePurpose
journey_idID-755Connect related website events.
local_search_idS11Reconstruct original search criteria.
tenant / mode / currencynorth / test / GBPEnforce isolation and display context.
provider_resource_typeflight_offerPrevent token-type confusion.
provider_resource_handleOF-2Map to encrypted provider ID server-side.
observed_expiryFixture-specific timestampApply freshness validation.
accepted_snapshotGBP 196; updated baggageShow what customer approved.
intent_statereconsent_requiredPrevent 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.

Operation-aware response policy with documented examples
ObservationInterpretationApplication behavior
Offer expiry reachedSelected priced resource no longer usableStop submission and refresh choice.
Price Check returns changed rateCommercial terms differShow updated breakdown; require acceptance.
Token request returns link expiryStep-specific authority no longer usableRegenerate through the documented shopping path.
Price Check reports unavailableSelected inventory cannot proceedOffer different inventory; do not invent continuity.
Create booking times outFinal reservation status unknownRetrieve original intent before another create action.
Retrieval confirms bookingAuthoritative booking existsPersist references and present confirmed details.
Retrieval remains inconclusiveFurther investigation neededMaintain 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.

Illustrative evidence entries and disclosure limits
Evidence keyRecorded factReviewer conclusionDisclosure level
EV-01S11 created at 09:00; north/test/GBPCorrect local search scopeInternal journey view
EV-02TR-6 attached to outbound operationTrace supports diagnostics onlyRestricted operations
EV-03OF-1 expiry 09:18; click 09:19Pre-submit block was correctSanitized support view
EV-04OF-2 GBP 196; baggage difference loggedReconsent requiredCustomer-visible summary
EV-05P-17 followed by C-22Price Check preceded hotel booking pathRestricted; no raw URLs
EV-06B-7 retrieval keyed by REF-755-01Duplicate prevention path maintainedRestricted 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.

Populated ID-755 acceptance matrix
TestInput or simulated eventExpected outcomeFixture result
T01Lookup S11 from north/testSearch returns matching scope and criteriaPass: scoped read allowed
T02Use TR-6 as offer IDType mismatch rejected before supplier callPass: rejected locally
T03Click OF-1 at 09:19Expiry gate stops booking creationPass: zero create calls
T04Replace OF-1 with OF-2GBP 14 increase and baggage change disclosedPass: consent required
T05Attempt OF-2 without new consentCheckout remains blockedPass: no payment or order action
T06Use P-17 for hotel bookingWrong link purpose rejectedPass: Price Check only
T07Follow valid P-17Price Check precedes C-22 issuancePass: lineage retained
T08Replay C-22 from another tenantScope check denies accessPass: no supplier request
T09Submit B-7; simulate timeoutMark pending; preserve original referencePass: REF-755-01 retained
T10Attempt new-reference retry for B-7Duplicate-risk guard blocks createPass: retrieval required
T11Retrieve B-7 as confirmedSave booking reference; close pending statePass: no duplicate booking
T12Retrieve B-7 inconclusivelyKeep pending; route for investigationPass: 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.