Best Practices
This page is a checklist of principles. Step-by-step payloads and code samples live in each operation (Search, Quote, Book, List, Content) and in Use cases.
Booking flow
- Search → Quote (
/prebooking) → Book — never skip quote before book;optionRefIdand price expire quickly. - On quote, detect price and policy changes and reconfirm with the customer before calling book.
- Store
bookingID,clientReference, and supplier references as returned.
Idempotency and recovery
- Set a unique
clientReferencebefore each book attempt. - If the HTTP result is unclear (timeout, disconnect), list bookings filtered by
clientReferenceand stay dates before retrying book. See Book — Timeouts and recovery. - Send
X-Request-IDorsettings.requestIdon every call for support correlation.
Partial failures and tracing
- A
200response can still include warnings andtracing.statusPARTIAL. Inspecttracing.accessSpansperconnectionCodesentry. - Use
auditTransactions: trueonly for targeted debugging; redact and avoid logging full payloads in production (Error handling).
Timeouts
- Set
settings.timeoutper operation; the platform may enforce supplier-specific minimums (especially for book). See Performance & availability.
ON_REQUEST and async confirmation
- If book returns
ON_REQUEST, show a pending state, poll booking detail with backoff, and/or rely on webhooks. See ON_REQUEST.
Content vs live calls
- Cache Content API responses (destinations, hotels, boards) with TTLs appropriate to your product.
- Use hotel filter / list endpoints to narrow availability payloads. Details: Content overview.
Errors and retries
- Retry 5xx and 429 with backoff; do not blindly retry book without reconciliation.
- Follow Error handling and Error codes.
Security and limits
- Keep API keys server-side; rotate keys per your policy (Authentication).
- Watch rate limit headers (Rate limits).
Sandbox
- Use Sandbox & testing for connection codes,
testMode, and safe end-to-end runs.