> For the complete documentation index, see [llms.txt](https://docs.kick.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kick.co/api/api-reference/ledgers.md).

# Ledgers

A ledger is the set of double-entry postings an entity keeps on one accounting basis. Every entity already keeps a cash ledger. The accrual ledger is opt-in, and opening it is the whole of this surface: once it exists you address it as `ledgerBasis=accruals` on [Journal Entries](/api/api-reference/journal-entries.md) and [Reports](/api/api-reference/reports.md).

The call is idempotent. An entity keeps one ledger per basis, so repeating it returns the existing ledger with `200` rather than opening a second one, and `basis: "cash"` resolves to the cash ledger the entity already has. Entities Kick does not keep books for, meaning personal entities and businesses with no legal type, are rejected with `400`.

## Open a ledger

> Opens the entity's ledger for the given accounting basis and returns it. Kick backfills the ledger from the entity's existing bookkeeping, so postings made before the accrual ledger existed are reflected in it. The call is idempotent: an entity keeps one ledger per basis, and repeating it returns the existing ledger with \`200\` instead of creating another. Entities Kick does not keep books for (personal entities, and businesses with no legal type) are rejected with \`400\`.

```json
{"openapi":"3.0.2","info":{"title":"Kick Platform API","version":"v1"},"servers":[{"description":"Production","url":"https://use.kick.co/api"}],"security":[{"organizationAccessToken":[]}],"components":{"securitySchemes":{"organizationAccessToken":{"description":"Organization access token issued by Kick, sent as `Authorization: Bearer kick_org_...`.","scheme":"bearer","type":"http"}}},"paths":{"/platform/v1/entities/{entityId}/ledgers":{"post":{"description":"Opens the entity's ledger for the given accounting basis and returns it. Kick backfills the ledger from the entity's existing bookkeeping, so postings made before the accrual ledger existed are reflected in it. The call is idempotent: an entity keeps one ledger per basis, and repeating it returns the existing ledger with `200` instead of creating another. Entities Kick does not keep books for (personal entities, and businesses with no legal type) are rejected with `400`.","operationId":"ledgers.create","parameters":[{"in":"path","name":"entityId","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"basis":{"description":"Accounting basis of the ledger to open. `accruals` opens the entity's accrual ledger; `cash` resolves to the cash ledger every entity already keeps.","enum":["cash","accruals"],"type":"string"}},"required":["basis"],"type":"object"}}},"description":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ledger":{"properties":{"basis":{"enum":["cash","accruals"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","basis","name","createdAt"],"type":"object"}},"required":["ledger"],"type":"object"}}},"description":"200"},"201":{"content":{"application/json":{"schema":{"properties":{"ledger":{"properties":{"basis":{"enum":["cash","accruals"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","basis","name","createdAt"],"type":"object"}},"required":["ledger"],"type":"object"}}},"description":"201"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"400"},"401":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"401"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"404"},"429":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"traceId":{"nullable":true,"type":"string"}},"required":["message"],"type":"object"}}},"description":"429"}},"summary":"Open a ledger","tags":["ledgers"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kick.co/api/api-reference/ledgers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
