Ledger
Close Calendar
Period close templates and checklists
Authentication
Authenticate with Authorization: Bearer ak_... — see API keys. Requests are scoped to one entity. Pass entityId as a query parameter, JSON field, or x-entity-id header. API keys are already pinned to an entity. A mismatched entityId returns 403.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/ledger/close-calendar?entityId= | List close templates/tasks |
| POST | /api/ledger/close-calendar | Create template or checklist |
| PATCH | /api/ledger/close-calendar | Update task status |
List close calendar
GET /api/ledger/close-calendar?entityId={entityId}
Returns close templates and tasks for the entity.
{
"templates": [
{ "id": "tpl_abc", "name": "Month-end close", "tasks": [...] }
],
"tasks": [
{ "id": "task_xyz", "templateId": "tpl_abc", "status": "pending", "dueOffset": 5 }
]
}Create template or checklist
POST /api/ledger/close-calendar
Body: { "entityId", "name", "tasks": [{ "name", "dueOffset" }] } for template, or { "entityId", "templateId", "periodId" } for checklist.
Update task status
PATCH /api/ledger/close-calendar
Body: { "entityId", "taskId", "status": "pending" | "in_progress" | "complete" }