EDistribution API

Price an order without creating it#

POST/v1/orders/preview

Prices exactly what POST /v1/orders would, and persists nothing — no cart, no order, no ledger entry, no credit authorization, and no inventory hold. Takes the same request body as POST /v1/orders; every pricing field comes back identical for identical input, because both endpoints run the same cart pricing engine. Safe to call as often as you like: repeated previews leave nothing behind.

Use it to quote a guest before committing. When they accept, send the same body to POST /v1/orders and the figures will match.

Scoped to the caller's own channel and agent group, exactly as POST /v1/orders is — there is no channelId/agentId/userId field on this payload and none would be honoured. Bank offers behave identically too: bankOfferCode and applyBestBankOffer work as they do on the real order, only your own channel's offers are visible, an explicit code always wins over applyBestBankOffer, and an unknown, off-channel or ineligible code comes back 400.

The response omits orderId (nothing was created) and validUntil (nothing is held or reserved, so there is nothing to expire); prices can move at any time.

Request

cURL
curl -X POST 'https://partner-api.elivaas.com/v1/orders/preview' \
  -u "$ELIVAAS_API_KEY:" \
  -H 'Content-Type: application/json' \
  -d '{"listingId":"list_9f8a2b1c","checkIn":"2026-08-10","checkOut":"2026-08-13","adults":2,"children":0,"infants":0,"selectedProperties":[{"propertyId":"prop_1a2b3c","quantity":1}],"meals":[{"mealId":"meal_breakfast","dates":["2026-08-01"],"unsureOfDates":true,"adults":0,"children":0,"chefOnCall":true}],"vas":[{"vasId":"vas_airport_transfer","variantId":"string","dates":["2026-08-01"],"unsureOfDates":true,"quantity":0,"dateQuantities":[{"date":"2026-08-01","quantity":0}]}],"bankOfferCode":"HDFC10","applyBestBankOffer":false,"externalRef":"PO-48213"}'
Response 200
{
  "currency": "INR",
  "items": [
    {
      "listingId": "string",
      "checkIn": "2026-08-01",
      "checkOut": "2026-08-01",
      "nights": 0,
      "soldOut": true,
      "itemSubtotal": 0,
      "cancellationPlanId": "string",
      "cancellationPlanDiscount": 0,
      "cancellationPolicy": [
        {
          "cancelBy": "2026-08-01",
          "refundPercentage": 0,
          "label": "string"
        }
      ]
    }
  ],
  "summary": {
    "baseSubtotal": 0,
    "mealsSubtotal": 0,
    "vasSubtotal": 0,
    "cancellationPlanDiscount": 0,
    "stayAfterCancellationPlan": 0,
    "bankOffer": {
      "code": "HDFC10",
      "title": "10% off with HDFC credit cards",
      "discountType": "PERCENTAGE",
      "discount": 1000,
      "applied": true,
      "reason": "string"
    },
    "priceAfterBankOffer": 0,
    "offersDiscount": 0,
    "taxableSubtotal": 0,
    "gst": 0,
    "grandTotal": 0
  }
}

Request body#

listingIdstringrequired

Listing to price.

checkInstring<date>required

Check-in date (ISO 8601).

checkOutstring<date>required

Check-out date (ISO 8601).

adultsinteger<int32>

Adult guest count.

childreninteger<int32>

Child guest count.

infantsinteger<int32>

Infant guest count.

selectedPropertiesobject[]

Specific properties picked from the listing, with per-property quantity. Omit to record only the listing-level booking, with no property breakdown tracked.

mealsobject[]

Meal add-ons to apply to the stay. Omit or leave empty for none.

vasobject[]

Value-added-service add-ons to apply to the stay. Omit or leave empty for none.

bankOfferCodestring

Apply this specific bank offer to the stay. Only offers available on your own channel can be applied; a code that doesn't exist, isn't offered on your channel, or isn't eligible for this stay is rejected with 400 — it is never silently dropped and never silently replaced by a different offer. Takes precedence over applyBestBankOffer, even when the best available offer is worth more.

applyBestBankOfferboolean

Apply the highest-value bank offer available on your channel for this stay, chosen for you. Ignored entirely when bankOfferCode is supplied. When no offer is eligible the order simply prices without one — that is not an error. The offer that won is named in summary.bankOffer on the response.

externalRefstring

Optional caller-supplied reference. Used as the order's display name when supplied; purely cosmetic, never used for lookups or scoping.

Responses#

StatusMeaning
200OK
400Validation failure. The message names the offending parameter. Limits are rejected, never silently clamped: an over-length id list, a page size above 100 or a date window longer than 365 days all land here rather than coming back quietly truncated.
401Missing, malformed, revoked or unknown API key, or an agent group whose distribution access is disabled. Pass the key as the HTTP Basic username with an empty password.
429Rate limit exhausted for this credential. Wait Retry-After seconds before retrying; the budget is per credential, not per IP.

See Errors for the error body shape and which statuses are worth retrying.