Developers
API referenceReferenceReports

Ledger

Generate ledger report data as JSON using typed report request filters and columns.

POST
/v1/business/{business_slug}/report/ledger/

Path Parameters

business_slug*string

Business slug that scopes this request. If you do not have one yet, call common_accessible_businesses_list and pick a slug from the response.

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/business/string/report/ledger/" \  -H "Content-Type: application/json" \  -d '{    "columns": [      {        "date_from": "2019-08-24",        "date_to": "2019-08-24"      }    ]  }'
{  "report_type": "string",  "date_from": "2019-08-24",  "date_to": "2019-08-24",  "attachments_by_document": {    "property1": [      {        "id": 0,        "name": "string",        "type": "string"      }    ],    "property2": [      {        "id": 0,        "name": "string",        "type": "string"      }    ]  },  "accounts": [    {      "number": "string",      "name": "string",      "opening_balance": 0.1,      "closing_balance": 0.1,      "entries": [        {          "number": "string",          "date": "2019-08-24",          "debet": 0.1,          "credit": 0.1,          "balance_csum": 0.1,          "description": "string",          "document_id": 0        }      ],      "totals": {        "property1": 0.1,        "property2": 0.1      }    }  ],  "totals": {    "property1": 0.1,    "property2": 0.1  }}