Quickstart#
From a key to a confirmed booking in six calls. Every request here is real — set ELIVAAS_API_KEY and the page runs top to bottom.
export ELIVAAS_API_KEY='dk_live_...'
# Sandbox — test data, nothing real is booked or charged. Start here.
export BASE='https://sandbox.partner-api.elivaas.com'
# Production — live inventory, real stays, real charges against your credit line.
# export BASE='https://partner-api.elivaas.com'Confirm the key works#
GET /v1/pingis the cheapest way to prove a deployment is holding the key you think it is. It echoes back your account and the key's prefix, so you can tell production from staging in a log line.It is authenticated and rate limited like everything else — do not use it as a high-frequency health check.
curl "$BASE/v1/ping" -u "$ELIVAAS_API_KEY:"const auth = 'Basic ' + Buffer.from(process.env.ELIVAAS_API_KEY + ':').toString('base64'); const res = await fetch(`${BASE}/v1/ping`, {headers: {Authorization: auth}}); console.log(await res.json());import os, requests res = requests.get(f"{BASE}/v1/ping", auth=(os.environ["ELIVAAS_API_KEY"], ""), timeout=30) print(res.json()){ "agentGroupId": 42, "agentGroupName": "Example Travel Pvt Ltd", "channelId": "B2B_EXAMPLE", "keyPrefix": "dk_live_9fQ" }A
401here means the key is wrong, revoked, or the account's access is disabled — all four look identical by design. See authentication.Find something to sell#
POST /v1/listings/searchsearches your channel's inventory. Everything is optional — an empty body returns the first page of everything you can sell.For a full catalogue sync use
GET /v1/listingsinstead, withupdatedSincefor incremental pulls. Searching in a loop to build a local copy is the wrong tool.curl -X POST "$BASE/v1/listings/search" \ -u "$ELIVAAS_API_KEY:" \ -H 'Content-Type: application/json' \ -d '{"city":"Kasauli","adults":4,"size":5}'{ "data": [ { "id": "lst_0853ie", "title": "Querencia | Pet-friendly 5-BHK Villa", "city": "Kasauli", "state": "Himachal Pradesh", "maxAdults": 13, "price": 2955300 } ], "nextCursor": null }Check the dates are open#
GET /v1/availabilityreturns one row per property per night across a date range. Ask for the whole range in one call — the endpoint exists so you never loop a date at a time.A night missing from the response is a night with no inventory.
curl -G "$BASE/v1/availability" \ -u "$ELIVAAS_API_KEY:" \ --data-urlencode 'listingIds=lst_0853ie' \ --data-urlencode 'from=2026-08-10' \ --data-urlencode 'to=2026-08-13'Price the stay#
POST /v1/ordersreturns a priced order: the exact grand total, the tax breakdown, and the cancellation terms the booking will carry.Nothing is held and nothing is charged. An order is a quote you can hand back to us.
Use
POST /v1/orders/previewif you want the same figures without persisting anything — useful for a pricing widget that fires on every date change.curl -X POST "$BASE/v1/orders" \ -u "$ELIVAAS_API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "listingId": "lst_0853ie", "checkIn": "2026-08-10", "checkOut": "2026-08-13", "adults": 4, "externalRef": "your-cart-8891" }'{ "orderId": "ord_7Kd2m1RtY0", "grandTotal": 22050.00, "currency": "INR", "checkIn": "2026-08-10", "checkOut": "2026-08-13" }Read
grandTotalfrom the response. You will send it straight back in the next call, and that is what makes the booking safe.Book it#
POST /v1/bookingsconverts the order into a real booking, charged against your credit line.Two fields carry all the safety:
acceptedTotalis the price you are agreeing to. If the stay has repriced since your order, the call is rejected with409instead of quietly charging the new figure.externalBookingIdis your idempotency key — your own id for this attempt, unique within your account. Retry with the same one and you get the same booking, never a second.curl -X POST "$BASE/v1/bookings" \ -u "$ELIVAAS_API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "orderId": "ord_7Kd2m1RtY0", "externalBookingId": "your-ref-000123", "acceptedTotal": 22050.00, "primaryGuest": { "firstName": "Asha", "lastName": "Rao", "email": "asha@example.com", "phone": "+919812345678" } }'{ "bookingId": "bkg_20Etl54TyD", "externalBookingId": "your-ref-000123", "status": "CONFIRMED", "totalAmount": 22050.00 }Read it back#
GET /v1/bookings/{bookingId}returns the full booking: properties, nights, guests, tax, cancellation policy and current status.If you would rather be told than poll, pass a
callbackUrlwhen you book and we will POST the terminal outcome to you instead. See callbacks.curl "$BASE/v1/bookings/bkg_20Etl54TyD" -u "$ELIVAAS_API_KEY:"
What you just did to your account#
The booking posted a charge to your ledger against your credit limit. It is not paid, and there is nothing to pay yet. On your billing cycle those charges become a GST invoice, and the invoice is what you settle.
Where to go next#
| If you need to | Read |
|---|---|
| Run discovery yourself instead of searching | Cache ARI |
| Understand what moved the price | Pricing and ordering |
| Handle refusals properly | Booking on credit, Errors |
| Stop polling | Callbacks |
| Change or cancel a stay | Amendments, Cancellations |
| Reconcile and pay | Credit and ledger, Invoices and paying |