EDistribution API

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.

bash
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'
  1. Confirm the key works#

    GET /v1/ping is 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
    curl "$BASE/v1/ping" -u "$ELIVAAS_API_KEY:"
    200
    {
      "agentGroupId": 42,
      "agentGroupName": "Example Travel Pvt Ltd",
      "channelId": "B2B_EXAMPLE",
      "keyPrefix": "dk_live_9fQ"
    }

    A 401 here means the key is wrong, revoked, or the account's access is disabled — all four look identical by design. See authentication.

  2. Find something to sell#

    POST /v1/listings/search searches 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/listings instead, with updatedSince for incremental pulls. Searching in a loop to build a local copy is the wrong tool.

    cURL
    curl -X POST "$BASE/v1/listings/search" \
      -u "$ELIVAAS_API_KEY:" \
      -H 'Content-Type: application/json' \
      -d '{"city":"Kasauli","adults":4,"size":5}'
    200 (trimmed)
    {
      "data": [
        {
          "id": "lst_0853ie",
          "title": "Querencia | Pet-friendly 5-BHK Villa",
          "city": "Kasauli",
          "state": "Himachal Pradesh",
          "maxAdults": 13,
          "price": 2955300
        }
      ],
      "nextCursor": null
    }
  3. Check the dates are open#

    GET /v1/availability returns 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
    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'
  4. Price the stay#

    POST /v1/orders returns 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/preview if you want the same figures without persisting anything — useful for a pricing widget that fires on every date change.

    cURL
    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"
      }'
    201 (trimmed)
    {
      "orderId": "ord_7Kd2m1RtY0",
      "grandTotal": 22050.00,
      "currency": "INR",
      "checkIn": "2026-08-10",
      "checkOut": "2026-08-13"
    }

    Read grandTotal from the response. You will send it straight back in the next call, and that is what makes the booking safe.

  5. Book it#

    POST /v1/bookings converts the order into a real booking, charged against your credit line.

    Two fields carry all the safety:

    acceptedTotal is the price you are agreeing to. If the stay has repriced since your order, the call is rejected with 409 instead of quietly charging the new figure.

    externalBookingId is 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
    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"
        }
      }'
    201 (trimmed)
    {
      "bookingId": "bkg_20Etl54TyD",
      "externalBookingId": "your-ref-000123",
      "status": "CONFIRMED",
      "totalAmount": 22050.00
    }
  6. 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 callbackUrl when you book and we will POST the terminal outcome to you instead. See callbacks.

    cURL
    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 toRead
Run discovery yourself instead of searchingCache ARI
Understand what moved the pricePricing and ordering
Handle refusals properlyBooking on credit, Errors
Stop pollingCallbacks
Change or cancel a stayAmendments, Cancellations
Reconcile and payCredit and ledger, Invoices and paying