Quote a cancellation#
GET
/v1/bookings/{bookingId}/cancellation-quoteWhat cancelling this booking right now would do to the agent group's ledger — the refundable/retained split, computed from the SAME cancellation-policy evaluation that later drives the actual ledger credit, so this quote can never drift from what gets credited. Read-only: calling this never posts anything to the ledger and never changes the booking. A booking belonging to another agent group is 404, identically to one that doesn't exist.
Request
curl -X GET 'https://partner-api.elivaas.com/v1/bookings/{bookingId}/cancellation-quote' \
-u "$ELIVAAS_API_KEY:" \
-H 'Content-Type: application/json'const res = await fetch('https://partner-api.elivaas.com/v1/bookings/{bookingId}/cancellation-quote', {
method: 'GET',
headers: {
Authorization: 'Basic ' + Buffer.from(process.env.ELIVAAS_API_KEY + ':').toString('base64'),
'Content-Type': 'application/json',
},
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();import os, requests
res = requests.get(
"https://partner-api.elivaas.com/v1/bookings/{bookingId}/cancellation-quote",
auth=(os.environ["ELIVAAS_API_KEY"], ""),
timeout=30,
)
res.raise_for_status()
data = res.json(){
"bookingId": "string",
"cancellable": true,
"reasonIfNot": "string",
"refundPercentage": 0,
"appliedWindow": "string",
"chargedAmount": 0,
"refundableAmount": 0,
"retainedAmount": 0,
"currency": "INR",
"checkinDate": "2026-08-01"
}Path parameters#
bookingIdstringrequiredNo description in the spec.
Responses#
| Status | Meaning |
|---|---|
200 | The quote. |
400 | Validation 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. |
401 | Missing, 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. |
429 | Rate 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.