Quickstart

Get a token and make your first WestIQ Platform API call.

The WestIQ Platform API is server-to-server. In this quickstart you exchange your partner credential for a bearer token, verify the API is reachable, and run your first natural-language catalog search — four steps, all copy-pasteable.

All examples use the staging base URL:

https://api.staging.westiq.ai
1

Get partner credentials

Your WestIQ partner manager issues an OAuth 2.0 client_id and client_secret, plus the token endpoint URL for your integration. The credential is already bound to your airline on the WestIQ side — there is no airline identifier for you to configure or send.

2

Request an access token

Exchange your client credentials for a short-lived bearer access token at your token endpoint (a Cognito hosted domain; the exact URL is in your onboarding pack):

$curl -X POST "https://<your-westiq-auth-domain>/oauth2/token" \
> -u "$WESTIQ_CLIENT_ID:$WESTIQ_CLIENT_SECRET" \
> -H "Content-Type: application/x-www-form-urlencoded" \
> -d "grant_type=client_credentials&scope=westiq/search"

The response contains the token and its lifetime:

1{
2 "access_token": "eyJraWQiOi…",
3 "expires_in": 3600,
4 "token_type": "Bearer"
5}

Cache the token and reuse it until it expires — do not request a new token per API call.

3

Verify the API is reachable

GET /healthz is the one anonymous endpoint. It reports liveness only:

$curl https://api.staging.westiq.ai/healthz
1{"status": "ok"}

Never commit client_secret or tokens to source control. Store them in a secrets manager and inject them at runtime.

The examples above run against the staging environment (api.staging.westiq.ai). Full request and response schemas for every endpoint live in the API Reference, generated from the platform’s OpenAPI document — the same document the live API serves at GET /openapi/v1.json.

Next steps

  • Authentication & tenancy — how credentials map to airlines, and the failures you can hit.
  • Search — request limits, how queries are parsed, scoring, and coverage reporting.
  • Behavioral events — batching passenger interaction signals into POST /v1/events.