List ledger entries#
/v1/ledgerThe agent group's own ledger, newest first, plus its current credit position (limit, exposure, available credit). Filter by from/to (occurred-at window, both inclusive), type/status (the DB-enforced vocabulary — any other value is a 400, never silently ignored), bookingIds (matches the PMS booking id — set only once a charge is POSTED, so an AUTHORIZED entry never matches this filter), or externalBookingIds (matches YOUR OWN reference, set at authorization time — this IS how you find a still-AUTHORIZED, in-flight charge before it has a PMS booking id). The two id filters are separate and never OR-matched against each other's column, so the two id namespaces never collide. Page with cursor — the opaque nextCursor from the previous page; a malformed or tampered cursor is a 400, never a crash and never a silent restart at page 1. AUTHORIZED (in-flight, not yet posted) entries ARE included here, clearly marked by their status, but do not count toward exposure/availableCredit's underlying posted balance the way a POSTED entry does — see GET /v1/statement for how balance figures treat them.
Request
curl -X GET 'https://partner-api.elivaas.com/v1/ledger' \
-u "$ELIVAAS_API_KEY:" \
-H 'Content-Type: application/json'const res = await fetch('https://partner-api.elivaas.com/v1/ledger', {
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/ledger",
auth=(os.environ["ELIVAAS_API_KEY"], ""),
timeout=30,
)
res.raise_for_status()
data = res.json(){
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "CHARGE",
"status": "AUTHORIZED",
"amount": 11800,
"currency": "INR",
"bookingId": "string",
"externalBookingId": "string",
"description": "string",
"occurredAt": "2026-05-21T11:09:03.024811Z"
}
],
"nextCursor": "string",
"creditLimit": 0,
"exposure": 0,
"availableCredit": 0
}Query parameters#
fromstring<date-time>Only entries that occurred on or after this instant.
tostring<date-time>Only entries that occurred on or before this instant.
typestring[]Ledger entry types to filter by. Unknown values are rejected (400).
statusstring[]Ledger entry statuses to filter by. Unknown values are rejected (400).
bookingIdsstring[]PMS booking ids to filter by (matches once a charge is POSTED). Max 100 per request.
externalBookingIdsstring[]Your own reference(s) to filter by — matches from authorization time, so this is the only filter that finds a still-AUTHORIZED, in-flight charge. Max 100 per request.
cursorstringKeyset cursor: the
nextCursorfrom the previous page.sizeinteger<int32>Page size, max 100.
Responses#
| Status | Meaning |
|---|---|
200 | OK |
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.