Quick-start: search, reprice, book
Search, reprice and book against the sandbox (https://apiq-sandbox.tripproagencysites.com). The search intent is EsimSearchIntent; the platform validates it against the schema context.domain selects.
The search body is the contract's own example: ESIM — EsimSearchIntent, eSIM data plans for a week in Japan, 3 GB or more.
Every sample reads a sandbox bearer token from AIKONIC_TOKEN, exchanged from a SANDBOX key (mo_test_…). The generated Kotlin and Swift clients default to the production base, so each sample sets the sandbox base explicitly.
eSIM orders book with your System key sent as X-Api-Key. A bearer token minted from a key is the AI channel: its money verbs, such as POST /v1/orders, wait for a human approval.
# A sandbox bearer token: exchange a SANDBOX key (mo_test_…) at POST /v1/oauth/token.
export AIKONIC_TOKEN=$(curl -s -u "$AIKONIC_CLIENT_ID:$AIKONIC_SANDBOX_KEY" \
-d grant_type=client_credentials https://apiq-sandbox.tripproagencysites.com/v1/oauth/token | jq -r .access_token)POST /v1/search
POST /v1/search with the vertical's typed intent. A 202 SEARCH_WARMING is progress: poll with the searchRef until COMPLETE, and label a PARTIAL answer as partial.
curl -X POST https://apiq-sandbox.tripproagencysites.com/v1/search \
-H "Authorization: Bearer $AIKONIC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"context": {
"domain": "ESIM",
"currency": "USD"
},
"message": {
"intent": {
"esim": {
"country": "JP",
"minDataGb": 3
},
"dates": {
"from": "2026-11-10",
"to": "2026-11-16"
},
"party": {
"adults": 1
}
}
}
}'POST /v1/reprice
POST /v1/reprice fixes the price of one offer and mints a repriceRef. The OF- reference shown is an example: use the offerRef from your search.
curl -X POST https://apiq-sandbox.tripproagencysites.com/v1/reprice \
-H "Authorization: Bearer $AIKONIC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"context": {
"domain": "ESIM",
"currency": "USD"
},
"message": {
"intent": {
"offerRef": "OF-3d90aa17"
}
}
}'POST /v1/orders
POST /v1/orders books the repriceRef with a fresh Idempotency-Key. No price is sent. Answer whatever requiredInfo the reprice returned; the RP- and pay_int_ references shown are examples.
Send this order with -H "X-Api-Key: $AIKONIC_SYSTEM_KEY" in place of the bearer. After the order, read each eSIM and its QR from GET /v1/orders/{orderRef}/tickets: one ticket per eSIM, read live and never stored.
curl -X POST https://apiq-sandbox.tripproagencysites.com/v1/orders \
-H "Authorization: Bearer $AIKONIC_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"context": {
"domain": "ESIM",
"clientReference": "acme-91827"
},
"message": {
"intent": {
"repriceRef": "RP-6b02c1",
"clientReference": "acme-91827",
"travelers": [
{
"firstName": "Ana",
"lastName": "Souza",
"email": "[email protected]",
"phoneNumber": "+5511998877665"
}
],
"requiredInfoAnswers": {},
"payment": {
"mode": "PSP_TOKEN",
"paymentRef": "pay_int_91aa"
}
}
}
}'