Cleartrip API integration begins with a permission decision, not an HTTP request. A travel platform may be technically capable of sending authenticated messages yet still lack approval for a particular tenant, environment, product, or market. This guide explains how to plan tenant onboarding, maintain evidence of authorised access, and design a controlled journey from a permitted search through price confirmation and human review. Its worked example is fictional, and its monetary amounts are test fixtures rather than Cleartrip offers or customer quotations.
What your team needs before Cleartrip onboarding
What an integration plan must establish
The first deliverable is an access register identifying the contracting or authorised party, the application, the tenant, the environment, and the precise operations allowed. A request that succeeds is not proof of commercial entitlement. Likewise, access to a reference page does not mean that credentials, booking privileges, or every travel product will be issued to an applicant.
The official Cleartrip getting-started reference documents an API-key-plus-JWT authentication mechanism and shows an illustrative request carrying an Origin header, an X-Api-Key header, and bearer authorisation. Its authentication reference describes an API key, an origin associated with onboarding, and an expiring bearer token. These are public documentation facts, not a grant of access to any individual integration.
A project team should separately establish which endpoints are available to its approved account, what transactions they cover, how test and live credentials are managed, and what additional commercial or operational prerequisites apply. Anything not confirmed in written onboarding evidence remains unapproved in the implementation plan.
Separate documentation, authentication and authorisation
Documentation tells developers how a published interface is represented. Authentication helps the service recognise a client. Authorisation answers whether that identified client may perform a specified operation in a defined context. Commercial readiness, including permitted products and markets, may require further confirmation. Treat these as distinct gates even where one onboarding contact coordinates them.
For example, a technically valid credential may be intended only for sandbox search. The application must not infer permission to create a production reservation, obtain unrelated content, or expose results to a different distributor. Route-level allowlists should be generated from approved records rather than inferred from whichever endpoint responds.
Build a tenant onboarding record before coding
Choose an accountable owner to request access through the provider's authorised channel. Record the requesting legal entity, application purpose, integration contact, data-handling contact, target markets, expected product categories, and intended environments. Ask for an explicit response tying the approved tenant or client to those dimensions. A meeting comment is useful context; a traceable approval record is the decision evidence.
The record should identify the origin value issued for each client, where credentials will be generated, any required network restrictions, and the documented process for token renewal. The getting-started reference notes that teams can contact Cleartrip about IP whitelisting for JWT-related access; this should be treated as a question for the provider, not a universal requirement or a substitute for application security.
Include a permission expiry or review date when applicable, a named internal owner, links to approval correspondence, and the version of the API documentation assessed. If Cleartrip has not supplied a product-specific capability or transaction rule to the project, write “not yet confirmed” instead of interpreting silence as approval.
Illustrative account, environment, product and market matrix
The following matrix is wholly fictional. It demonstrates how to encode entitlement boundaries for the example tenant CT-710; it does not describe any real Cleartrip account or currently offered contract.
| Account and environment | Product and operation | Market and origin | Permission decision | Required evidence or action |
|---|---|---|---|---|
| CT-710 sandbox | Flight search, read-only | Fictional India market; SBX-CT710-ORIGIN | Approved for fixture testing | Sandbox approval record CT-PERM-01 |
| CT-710 sandbox | Flight price recheck, read-only | Same market and sandbox origin | Approved for fixture testing | Scope confirmation CT-PERM-02 |
| CT-710 sandbox | Booking, ticketing or cancellation | Any market; sandbox origin | Not approved | Block write actions; request explicit scope |
| CT-710 production | Flight search or price recheck | India; PROD-CT710-ORIGIN | Pending separate approval | Obtain live onboarding and credential evidence |
| CT-710 production | Booking or ticketing | Any market; production origin | Not approved | No live transaction path enabled |
| Any other account | Hotel, ancillary or other product | Any market or origin | Outside CT-710 scope | Separate product, account and market assessment |
The invented labels SBX-CT710-ORIGIN and PROD-CT710-ORIGIN deliberately differ. They are explanatory placeholders, not genuine credential values or a prescribed provider naming convention. The application should reject attempts to use one environment's origin with another environment's credential set, even when the outbound HTTP request could otherwise be constructed.
Implement authentication as a managed dependency
Cleartrip's authentication documentation names three request headers: Origin, X-Api-Key, and Authorization. It describes the bearer token as expiring and indicates that a new access token must be generated from the dashboard after expiry. The getting-started page additionally refers to JWT generation through an API cockpit. Use the currently supplied, account-specific instructions to reconcile portal terminology and required steps before deploying.
Keep the API key and JWT in a secret manager or comparably protected server-side facility. Never embed them in browser JavaScript, mobile application packages, public repositories, analytics URLs, support screenshots, or downloadable logs. This article intentionally contains no real credential, no token-shaped sample, and no executable call with secret values.
Associate each secret with an account, environment, approved origin, intended operation group, issuing process, and rotation owner. Separate test and production secret storage. Give only the integration service the ability to retrieve credentials and restrict administrative access by role. Log the identifier of the secret record rather than its value.
Expired token renewal and failure handling
Track documented token validity as operational metadata. If an authorised request fails because the bearer token has expired, stop that transaction, use the provider-approved dashboard renewal procedure, update the protected secret, and retry only if the operation is safely repeatable. Do not silently create a booking or submit repeated writes as part of a generic authentication retry routine.
The official authentication reference identifies authentication errors with the EA prefix and lists examples including EA001 for an unrecognised origin, EA003 for an inactive tenant, EA004 for an invalid origin-to-key mapping, and EA005 for a reset or regenerated client. Its documentation also lists EA002 for an unmatched client. These codes can inform troubleshooting, but they should not be treated as blanket permission to rotate credentials or switch tenants.
On a mismatch, fail closed and surface a sanitised incident record containing the correlation identifier, environment, attempted operation, timestamp, and returned error category. Route persistent failures to an authorised contact. A fallback that automatically substitutes a different origin or an unrelated client would cross the permission boundary and must be prohibited.
Keep web research and API access within their scopes
Public web research can help a team locate relevant reference pages and identify questions for onboarding. It cannot establish an applicant's private entitlements, make a published endpoint available to a tenant, or legitimise scraping restricted travel content. Limit preparatory research to the two official references linked here and provider communications obtained through authorised channels for this particular project.
A search of public documentation is distinct from a flight-availability search conducted through approved integration access. In the CT-710 fixture, “search” means a fictional, explicitly approved, read-only sandbox operation. It is not a claim that a named flight-search endpoint, schema, availability feed, or market scope is publicly documented in the two cited references.
Do not extrapolate endpoint paths, HTTP methods, request fields, passenger-data requirements, service levels, rate limits, pricing rules, cancellation abilities, or settlement arrangements from the authentication examples. The onboarding owner should request product-specific documentation and confirm each such property before development work depends on it.
Design the integration around enforceable gates
A practical architecture separates the user interface, an entitlement service, an API adapter, a quote store, and an audit trail. The entitlement service decides whether an account can invoke an operation in the selected environment, product and market. The adapter applies the approved origin and manages server-side credentials. The quote store retains the evidence needed to explain a result without declaring that a displayed amount is guaranteed.
The user interface should request only actions the current tenant may perform. Hiding a button is not enough: the server must reject unauthorised operations independently of UI state. Maintain explicit states such as not onboarded, sandbox approved, production pending, read-only enabled, consent required, and transaction blocked. Avoid a single Boolean called “Cleartrip connected,” because it conceals the dimensions that matter.
Plan for provider data to arrive with varying certainty. Search output may be a snapshot, a recheck may change the amount, and a successful transport response may still be incomplete for the business purpose. Preserve raw authorised response references securely alongside a normalised view, according to applicable retention and data-protection obligations, so reviewers can distinguish what was returned from what the platform derived.
For any later booking capability, create a separate approval and design stage that addresses transaction idempotency, payment, travellers, acknowledgement, ticketing, support and reconciliation. None of those operational rights is granted by CT-710's fictional search approval.

Illustrative fixture: CT-710 sandbox search and recheck
This original test fixture models a sandbox tenant that has written approval for fictional read-only flight search and price recheck in one market. It has no booking authorisation and is not connected to a real supplier. The scenarios demonstrate consent boundaries, observable evidence and safe handling of uncertain outcomes; the numbers and references below were invented for teaching.
Fixture inputs and expected outcomes
| Fixture ID and event | Input or observed state | Expected platform outcome | Evidence retained |
|---|---|---|---|
| CT-710-01: initial search | Sandbox origin; flight search permitted; quoted INR 6,400 | Display provisional amount and recheck requirement | Approval CT-PERM-01; search reference SR-710-A; timestamp |
| CT-710-02: price recheck | Same account and scope; rechecked INR 6,750 | Replace old amount; disclose INR 350 increase before consent | Recheck reference PR-710-A; prior quote link; timestamp |
| CT-710-03: consent gate | Traveller has not accepted INR 6,750 | Show updated terms; no purchase or booking request | Consent status “pending”; version of displayed quote |
| CT-710-04: expired JWT | Authentication fails after documented token validity | Pause; renew through authorised procedure; retry safe read only | Sanitised error; token-record version; renewal audit |
| CT-710-05: wrong origin | Production origin submitted to sandbox context | Reject locally; never substitute another tenant | Policy denial; environment mismatch event |
| CT-710-06: ambiguous result | Read request times out after upstream processing is uncertain | Look up original search or recheck reference first | Original reference; correlation ID; investigation outcome |
| CT-710-07: attempted booking | Client requests a transaction despite read-only entitlement | Block before provider call; hand over access request | Entitlement denial; reviewer and case ID |
In this fixture, INR 6,750 minus INR 6,400 equals an INR 350 increase. That is a scenario-specific difference, not a statement about actual fare movement. If the interface describes it as approximately 5.5% above the initial amount, it must use INR 6,400 as the denominator and show the exact values alongside the percentage.
The user must encounter the revised amount before any action that could commit funds or create a travel transaction. A previously captured acceptance of INR 6,400 does not authorise INR 6,750. Even fresh consent would not turn a read-only CT-710 tenant into a booking-enabled account; a separate production entitlement is necessary.
Evidence ledger for the worked example
| Question | Evidence artefact | Owner | Acceptance condition |
|---|---|---|---|
| May this client search? | CT-PERM-01 signed sandbox scope record | Integration owner | Account, environment, product and market match |
| Is price recheck allowed? | CT-PERM-02 read-only operation approval | Provider liaison | Operation is expressly listed |
| Which origin is correct? | CT-ONBOARD-01 protected onboarding registry | Platform administrator | Sandbox origin mapped to sandbox client |
| What amount was displayed? | SR-710-A and PR-710-A quote snapshots | Quote service | INR 6,400 and INR 6,750 separately timestamped |
| Was revised price accepted? | CT-CONSENT-01 pending-consent record | Experience team | No affirmative acceptance is claimed |
| Was a booking made? | CT-POLICY-07 outbound action audit | Security reviewer | Zero booking calls; denied attempt traceable |
Store evidence references rather than exposing tokens or unnecessary personal details. A reference is useful only when it resolves to a record that authorised reviewers can access and understand. Define retention, access controls and redaction with the customer's legal and security teams; this fixture does not prescribe a provider retention period.
Make ambiguous outcomes explicit
A timeout, dropped connection or malformed response is not equivalent to “no results,” and HTTP success is not necessarily equivalent to a complete usable result. Distinguish transport success, authenticated client status, schema validation, business completeness and authorisation. Each has a different failure path and owner.
For CT-710-06, keep the original search or recheck reference and investigate whether the authorised source can retrieve that existing result. Prefer a documented original-reference lookup, when the provider has confirmed such a capability, over issuing an unrelated repeat request. If no supported lookup exists, escalate rather than inventing a response or automatically assuming nothing occurred.
This principle becomes stricter for any future write operation. Never resend an uncertain booking merely because its first response was lost. First establish the provider-approved method for finding the original transaction, its status and its identifiers. Without that method and explicit booking access, the transaction workflow must remain disabled.
Testing plan: prove both allowed and denied behaviour
Testing should start with synthetic inputs and a provider-authorised test environment. Do not direct load tests, negative-path experiments or unsupported operations at a live tenant. Agree the permissible test coverage with the onboarding contact, and document expected outcomes before executing anything that could affect a real account.
| Test and scope | Method | Pass condition | Failure response |
|---|---|---|---|
| Entitled sandbox search | Use approved account, origin and read-only operation | Result stored with source reference and provisional label | Stop and inspect approved scope |
| Prohibited production access | Simulate request with production environment selected | Local policy blocks any outbound call | Disable configuration and raise review |
| Market or product mismatch | Try out-of-scope fixture selection | Server refuses before adapter invocation | Correct entitlement mapping |
| Credentials unavailable | Remove synthetic secret reference from test vault | No request sent and no secret leaked to logs | Restore approved secret access |
| Expired bearer token | Simulate token-expiry response | Read pauses; documented renewal path is followed | Escalate without cross-account fallback |
| Price change | Present INR 6,400 then INR 6,750 | INR 350 change visible; new consent required | Block progression and flag UI defect |
| Ambiguous search response | Simulate timeout while reference remains known | Reference-first investigation; no fabricated result | Human review and preserved trace |
| Booking without permission | Attempt synthetic booking command | Zero provider booking calls; denial logged | Stop release and correct server guard |
| Audit and privacy review | Inspect permitted event samples | Decision traceable; keys and JWT absent | Redact and retest before approval |
Test results should include the executed configuration version, observed and expected states, approver, and any unresolved defects. A green authentication test cannot replace the negative tests: the most important proof is often that the platform refuses an action for which it has no entitlement.
Release gates and environment separation
Require a release review that compares the deployment manifest with the permission matrix. Confirm that no production origin, credential or endpoint has been silently substituted into a sandbox build. Make environment selection explicit in deployment configuration rather than deriving it from user-provided text or a fallback variable.
Before expanding beyond read-only sandbox use, collect fresh approval for the precise account, environment, product, operation and market. Revalidate authentication instructions against the official documents and any current provider-supplied material. Document decisions when public references do not settle a point; a guessed integration capability is not an acceptable release dependency.
Operational monitoring without overclaiming
Useful internal measures include the proportion of blocked out-of-scope requests, credential-renewal incidents, search or recheck error categories, unresolved original-reference cases, and the share of price changes shown before consent. These are proposed implementation metrics, not published Cleartrip service benchmarks or promises about response time.
Alert on unexpected origin changes, repeated authentication mismatches, attempts to reach booking functions, and missing audit references. Correlate events by a non-sensitive request identifier. Do not log bearer tokens, full credential headers, or personal information simply because troubleshooting would be convenient.
Separate provider errors from local configuration failures. An inactive tenant condition, for example, warrants an onboarding investigation rather than an endless retry loop. An unsupported operation warrants a permission review rather than a request-format workaround. Monitoring should reinforce the contract boundary, not help software evade it.
Human handover: decisions software must not improvise
Assign a human escalation path before the first integration test. The integration owner handles entitlement requests; a platform administrator manages protected configuration; a support reviewer explains quote uncertainty; and an authorised commercial contact resolves questions about live transaction scope. One person may hold multiple roles, but ownership must be visible in the register.
| Trigger | Assigned role | Handover packet | Closure rule |
|---|---|---|---|
| Production access requested | Provider liaison | Requested market, product, operation and live client | Written approval or recorded denial |
| EA-series authentication issue | Platform administrator | Sanitised code, origin label and correlation ID | Correct authorised mapping validated |
| INR 350 recheck increase | Customer experience reviewer | Two timestamped quotes and pending consent | Traveller informed; no silent acceptance |
| Ambiguous original result | Integration support lead | Original reference, trace and confirmed lookup options | Status resolved or explicitly left pending |
| Attempted unapproved booking | Security and integration owners | Denied action and entitlement snapshot | Guard confirmed; expanded access separately assessed |
Present any unresolved case to the customer in ordinary language: the latest price needs confirmation, the result status is being checked, or the requested action is not yet enabled. Do not imply that an itinerary is confirmed, paid or ticketed when the platform holds only a search or quote reference.
Questions to close with the authorised provider team
Does having an API key permit production bookings?
No such conclusion follows from the cited authentication pages. They explain how a client authenticates, not an applicant's specific transaction entitlements. Obtain written confirmation for production, the selected product and market, and each requested write operation before enabling any booking pathway.
Can one origin be reused for sandbox and production?
Do not assume it can. The official authentication documentation associates origin with client onboarding. This guide intentionally assigns different fictional origins to the two environments; the real mapping must come from the provider's authorised onboarding record, not from copying a header between deployments.
How should an expired JWT be handled?
The official reference says the bearer token has a validity period and requires generating a new access token after expiry. Follow the approved dashboard procedure, update protected credentials and limit any retry to operations whose replay is understood. Never interpret token renewal as a change in product permission.
Can a changed quote be accepted automatically?
Not in the CT-710 model. A recheck from INR 6,400 to INR 6,750 is presented as a new amount requiring explicit, informed consent. That consent is a user-experience requirement in the example, not a grant of booking access and not a statement of Cleartrip's commercial fare policy.
What should happen when a request's outcome is unclear?
Keep its original reference and investigate via an approved, documented lookup where available. If the provider has not established that capability, hand the case to an authorised human reviewer. Do not substitute zero, invent a successful response, or resend an uncertain write transaction without a confirmed recovery design.
Implementation readiness for TravelTech365 projects
A responsible Cleartrip API integration proposal should describe access discovery, entitlement modelling, server-side authentication, protected secret lifecycle, approved search and recheck behaviours, evidence capture, consent handling, and handover paths. Delivery estimates and scope should remain conditional on documentation and permissions actually supplied for the specific client.
For CT-710, readiness means the sandbox can perform only approved read-only operations, its price change is visible, and every attempt to cross into production or booking is blocked. The next milestone is not a speculative booking demo. It is a documented decision from the authorised provider relationship, followed by updated tests for whatever scope is genuinely granted.
TravelTech365 can use this permission-first method to structure requirements and implementation planning without implying a privileged Cleartrip partnership, universal API availability, or a completed customer integration. The official getting-started page and authentication page are the public starting points; account-specific written approval remains the controlling input for actual access.
