Get ledgers
Retrieve a list of ledgers with optional filtering, sorting, and pagination. By default, returns only control ledgers (is_subledger=false). Use `only_subledgers=true` to retrieve subledgers, or `include_subledgers=true` to retrieve all ledgers.
Query Parameters
Maximum number of records to return
Number of records to skip
Field to sort by
Sort order (asc or desc)
JSON-encoded filter criteria
Return only subledgers
Exclude subledgers (return only control ledgers)
Include all ledgers (ignore is_subledger filter)
Response Body
application/json
curl -X GET "https://example.com/v1/ledgers"{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"description": "string",
"type": "asset",
"currency_id": "305e0674-ee79-42b7-bf83-278294a47a7b",
"currency_code": "string",
"balance_posted": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"balance_pending": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"balance_available": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"balance_lcy": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"overdraft_enabled": true,
"overdraft_limit": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"last_activity_date": "2019-08-24T14:15:22Z",
"opening_date": "2019-08-24T14:15:22Z",
"closing_date": "2019-08-24T14:15:22Z",
"parent_ledger_id": "6ca1dd41-a3ae-4231-bfe4-f90cf4cf9924",
"child_ledger_ids": [
"b8dc527d-24c9-4ff7-91e9-a4370f6cbbf7"
],
"icon_name": "string",
"icon_title": "string",
"dashboard": true,
"direct_booking": true,
"revaluate": true,
"off_balance": true,
"purpose_control": "",
"is_subledger": true,
"account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",
"purpose": "current",
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"description_pattern": "string",
"customer_types": [
"string"
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"active": true
}
],
"total": 0,
"has_more": true
}Retrieves chart-ready balance history for one or more ledgers selected by code (search.ledger_code.in). Points come from the daily balance snapshots inside the half-open window search.snapshot_date.gte … search.snapshot_date.lt; y values are in major currency units. A ledger under balance monitoring additionally carries its monitoring ladder as `thresholds` (absolute major units, lowest limit first) so clients can draw the limit lines; unmonitored ledgers omit the element.
Next Page