Skip to main content
Partner API · Beta

Partner API v1

Search and book hotels, flights and FD fares from your own system, paid from your Idea Holiday agent wallet.

Get access

01

Verify your business PAN in the agent portal, then apply under Help > API Access.

02

Create a sandbox key at once and build against it.

03

After approval and the one-time setup fee, create live keys and lock them to your server IPs.

Call the API from your server only. Never put keys in browser or app code.

Keys and sandbox

Send your key in the x-api-key header on every request. Each key is enabled for some products; a key without access gets 403 SCOPE_NOT_ALLOWED, and a key locked to IPs gets 403 IP_NOT_ALLOWED from any other address.

ih_test_…

Sandbox. Hotels: every call against demo hotels. Flights: search and fare-quote. FD fares: availability and search. No money moves.

ih_live_…

Live. Real bookings paid from your agent wallet (balance + credit limit). Needs a verified business PAN.

curl 'https://b2b.ideaholiday.com/api/v1/partner/wallet' \
  --header 'x-api-key: ih_test_<YOUR_KEY>'

Responses and booking safety

Every response uses one envelope. On an error status is "error" and errors holds { code, message }. Quote request_id (also the X-Request-Id header) to support.

{
  "request_id": "6f1c…",
  "status": "ok",
  "data": { },
  "errors": [],
  "meta": { "currency": "INR" }
}

Every booking needs a unique Idempotency-Key header: sending it again returns the first answer and never books twice. After a timeout, read the booking status before trying again. If the price changed since the quote, re-quote and confirm the new price.

Endpoints

Paths are relative to the base URL. Request and response shapes are in the OpenAPI file.

Loading endpoints…

Webhooks

Set one https URL under Help > API Access > Webhook and choose your events. We POST an event when a booking you made through the API changes later, and when your wallet runs low.

booking.confirmed

A hotel is confirmed, or a flight or FD booking has its PNR.

booking.ticketed

A flight ticket is issued.

booking.failed

A booking failed.

booking.cancelled

A booking is cancelled.

booking.pnr_changed

The airline changed an FD booking's PNR; data.previousPnr holds the old one.

wallet.low

Available funds fell below the amount you set (default Rs.10,000). At most once a day.

{
  "id": "delivery id",
  "event": "booking.pnr_changed",
  "sandbox": false,
  "createdAt": "2026-10-02T10:15:00.000Z",
  "data": { "product": "FD", "previousPnr": "OLD123", "booking": { "booking_id": "…", "pnr": "NEW456" } }
}

Headers: X-IH-Event, X-IH-Delivery (drop duplicates by it) and X-IH-Signature: t=<unix seconds>,v1=<hex>. Check it with HMAC-SHA256 of <t>.<raw body> using your signing secret and reject events older than 5 minutes. Answer with any 2xx; failures are retried after 1, 5, 30, 120 and 720 minutes.

Errors

HTTP 401

API_KEY_REQUIRED, INVALID_API_KEY, API_KEY_INACTIVE, API_KEY_EXPIRED

HTTP 403

SCOPE_NOT_ALLOWED, IP_NOT_ALLOWED, ACCOUNT_INACTIVE, KYB_REQUIRED, SANDBOX_NOT_SUPPORTED

HTTP 400

VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED

HTTP 402

INSUFFICIENT_FUNDS, PAYMENT_FAILED

HTTP 409

PREBOOK_FAILED, PREBOOK_EXPIRED, BOOKING_FAILED, BOOKING_IN_PROGRESS, NOT_CANCELLABLE, CANCEL_FAILED, STATUS_UNAVAILABLE

HTTP 422

IDEMPOTENCY_KEY_REUSED

HTTP 429

RATE_LIMITED (Retry-After header), SEARCH_QUOTA_EXCEEDED

HTTP 5xx

SUPPLIER_ERROR, INTERNAL_ERROR: check the booking status before booking again