Skip to content
ApiqDevelopers
API v1.64.0Open console

Quick-start: search, reprice, book

The three calls every booking makes, in order, against the sandbox. Bodies use only fields the contract and the API specs state; every reference shown (OF-, RP-, pay_int_) is an example value, so copy the real one from the previous response.

Quickstarts per vertical

The same three calls for each product, with the search intent the contract types for it, in cURL, TypeScript, Python, Kotlin and Swift.

Before you start

Set AIKONIC_TOKEN to a sandbox bearer token. Never put a production key in a script you share. The TypeScript samples use the published connect client.

TypeScript client setup
import { createConnectClient } from "@mondee-one/connect-client";

const connect = createConnectClient({
  baseUrl: "https://apiq-sandbox.tripproagencysites.com",
  token: process.env.AIKONIC_TOKEN,
});

Step 2 · Reprice

POST /v1/reprice

POST /v1/reprice turns an offer into a firm price and mints a repriceRef. Reprice is mandatory and never cached. When priceChanged is true, show previousPrice and price side by side and get the traveller's consent before booking.

cURL
curl -X POST https://apiq-sandbox.tripproagencysites.com/v1/reprice \
  -H "Authorization: Bearer $AIKONIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "context": {
    "domain": "FLT",
    "currency": "USD",
    "clientReference": "acme-91827"
  },
  "message": {
    "intent": {
      "offerRef": "OF-F-3d90aa17",
      "travelers": [
        {
          "type": "ADT"
        },
        {
          "type": "CHD",
          "age": 9
        }
      ]
    }
  }
}'
TypeScript
const firm = await connect.request(
  "/v1/reprice",
  "post",
  {
    "context": {
      "domain": "FLT",
      "currency": "USD",
      "clientReference": "acme-91827"
    },
    "message": {
      "intent": {
        "offerRef": offerRef,
        "travelers": [
          {
            "type": "ADT"
          },
          {
            "type": "CHD",
            "age": 9
          }
        ]
      }
    }
  },
);
// priceChanged === true: show previousPrice and price side by side and get consent
// before booking. The server states both figures; do not compute the difference.
const repriceRef: string = firm.message.repriceRef;

Step 3 · Book

POST /v1/orders

POST /v1/orders commits the repriceRef. It sends no price and never re-quotes: the amount is the one the reprice fixed. Obtain paymentRef from the payment-intent call first; no card data ever goes in this request.

cURL
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": "FLT",
    "clientReference": "acme-91827"
  },
  "message": {
    "intent": {
      "repriceRef": "RP-F-6b02c1",
      "clientReference": "acme-91827",
      "travelers": [
        {
          "firstName": "Ana",
          "lastName": "Souza",
          "email": "[email protected]",
          "phoneNumber": "+5511998877665"
        }
      ],
      "requiredInfoAnswers": {
        "traveler[0].dateOfBirth": "1990-04-02"
      },
      "payment": {
        "mode": "PSP_TOKEN",
        "paymentRef": "pay_int_91aa"
      }
    }
  }
}'
TypeScript
const order = await connect.request(
  "/v1/orders",
  "post",
  {
    "context": {
      "domain": "FLT",
      "clientReference": "acme-91827"
    },
    "message": {
      "intent": {
        "repriceRef": repriceRef,
        "clientReference": "acme-91827",
        "travelers": [
          {
            "firstName": "Ana",
            "lastName": "Souza",
            "email": "[email protected]",
            "phoneNumber": "+5511998877665"
          }
        ],
        "requiredInfoAnswers": {
          "traveler[0].dateOfBirth": "1990-04-02"
        },
        "payment": {
          "mode": "PSP_TOKEN",
          "paymentRef": "pay_int_91aa"
        }
      }
    }
  },
  { idempotencyKey: crypto.randomUUID() },
);
// The body carries the reprice ref and no price: book never re-quotes. A retry after a
// timeout reuses the SAME key (replay), it does not mint a new one.
console.log(order.message.orderRef, order.message.state);

Rules these samples follow

  • Money is an integer in minor units plus an ISO-4217 currency: 84210 USD is 842.10. Never a float, and never your own arithmetic: render the totals the server returns.
  • Every mutation sends an Idempotency-Key. Retry a timed-out request with the same key, never a new one. The same key with a different body is a 409.
  • Book takes the reprice reference alone. If the price moved you get PRICE_CHANGED, not a silent new charge: reprice again and ask again.
  • Branch on the error code and retryable, never on the HTTP status alone.

Downloads

The published contract and the Postman artifacts generated from it, unchanged. Contract v1.64.0, API version 2026-09-30.

SHA256SUMSCheck a download with sha256sum -c SHA256SUMS.

Also in the portal

Quickstarts for every vertical in five languages, the SDK packages, the Postman collection and a try-it console that runs against the sandbox with a sandbox key are all linked from here. The OpenAPI document below generates a client in any other language.

Next: browse every operation in the API reference