API reference
Close tasks
The checklist each month's close works through, and its sign-offs.
- GET
/v1/close_tasksList the close checklist's tasks - POST
/v1/close_tasksAdd a task to the close checklist - GET
/v1/close_tasks/{task_id}Get a close task - PATCH
/v1/close_tasks/{task_id}Change a close task - DELETE
/v1/close_tasks/{task_id}Remove a task from the close checklist - POST
/v1/periods/{key}/close_tasks/{task_id}/sign_offSign a close task off for a month - DELETE
/v1/periods/{key}/close_tasks/{task_id}/sign_offTake back a close task's sign-off for a month
Guides: Close the month
List the close checklist's tasks
GET/v1/close_tasks
client.closeTasks.list()
The tasks every month's close asks for, in the order they were written — which is the order a month's checklist lists them in.
Parameters
| Name | Type | Description |
|---|---|---|
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/close_tasks" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Add a task to the close checklist
POST/v1/close_tasks· Idempotent
client.closeTasks.create()
Add a task to the close checklist. Every open month's close asks for it from now on, and none of them can close until it is signed off (or the close is forced) when it blocks. Closed months are not changed.
Request body
Response
201CloseTaskOut
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/close_tasks" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"title":"…"}'Get a close task
GET/v1/close_tasks/{task_id}
client.closeTasks.get()
One task of the close checklist.
Parameters
| Name | Type | Description |
|---|---|---|
task_idPath · Required | string | An id that starts with |
Response
200CloseTaskOut
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/close_tasks/{task_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Change a close task
PATCH/v1/close_tasks/{task_id}· Idempotent
client.closeTasks.update()
Change a task: rename it, hand it to someone else, move its due day, say whether the close waits on it or what it is done after. Every open month's close changes with it; a closed month keeps the task as it was.
Parameters
| Name | Type | Description |
|---|---|---|
task_idPath · Required | string | An id that starts with |
Request body
Response
200CloseTaskOut
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X PATCH "https://api.ledgerit.ai/v1/close_tasks/{task_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'Remove a task from the close checklist
DELETE/v1/close_tasks/{task_id}
client.closeTasks.delete()
Remove a task from the checklist and from every open month's close, sign-off and all. A closed month's record of it stays, under the title it had.
Parameters
| Name | Type | Description |
|---|---|---|
task_idPath · Required | string | An id that starts with |
Response
204No content
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X DELETE "https://api.ledgerit.ai/v1/close_tasks/{task_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Sign a close task off for a month
POST/v1/periods/{key}/close_tasks/{task_id}/sign_off
client.closeTasks.signOff()
Sign a task off for one month, on the record, starting the month's
close run if it has none. Safe to repeat: a task already signed off keeps
its first sign-off. Refused with close_task_waiting while a task it is
done after is not signed off, and with period_closed once the month is
closed.
Parameters
| Name | Type | Description |
|---|---|---|
keyPath · Required | string | |
task_idPath · Required | string | An id that starts with |
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/periods/{key}/close_tasks/{task_id}/sign_off" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Take back a close task's sign-off for a month
DELETE/v1/periods/{key}/close_tasks/{task_id}/sign_off
client.closeTasks.undoSignOff()
Take back a task's sign-off for one month, on the record. Refused with
close_task_waiting while a task done after it is signed off, and with
period_closed once the month is closed; reopen it first.
Parameters
| Name | Type | Description |
|---|---|---|
keyPath · Required | string | |
task_idPath · Required | string | An id that starts with |
Response
204No content
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X DELETE "https://api.ledgerit.ai/v1/periods/{key}/close_tasks/{task_id}/sign_off" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
CloseTaskPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of CloseTaskOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
NewCloseTask
| Name | Type | Description |
|---|---|---|
assignee_id | string or null | An id that starts with |
blocking | boolean | Whether a month's close waits on it. Defaults to true. |
depends_on_ids | array of string | Tasks of these books it waits on: it is not signed off for a month until they are. |
details | string or null | How to do it, or where to look. |
due_days | integer or null | Due this many days after each month ends. Omit for no due day. |
titleRequired | string | What has to be done, in a line. |
CloseTaskOut
| Name | Type | Description |
|---|---|---|
assignee_emailRequired | string or null | The owner's address in these books, when there is an owner. |
assignee_idRequired | string or null | An id that starts with |
blockingRequired | boolean | Whether a month's close waits on it. A task that does not block can be left undone when the month closes. |
created_atRequired | string (date-time) | When the task was written. |
depends_on_idsRequired | array of string | The tasks it waits on: it is not signed off for a month until they are (decision 0089). |
detailsRequired | string or null | How to do it, or where to look, when there is more to say. |
due_daysRequired | integer or null | Due this many days after each month ends (0 is the last day). Null for no due day. |
idRequired | string | The task's id. |
titleRequired | string | What has to be done, in a line: “Book the payroll accrual”. |
CloseTaskChanges
Only the fields sent change. details, assignee_id and due_days
are cleared by sending null; title and blocking cannot be.
| Name | Type | Description |
|---|---|---|
assignee_id | string or null | An id that starts with |
blocking | boolean | Whether a month's close waits on it. |
depends_on_ids | array of string or null | The tasks it waits on, all of them: an empty list waits on none. |
details | string or null | How to do it; null clears it. |
due_days | integer or null | Due this many days after each month ends; null for no due day. |
title | string | What has to be done, in a line. |
SignOffRequest
| Name | Type | Description |
|---|---|---|
note | string or null | Anything worth keeping beside the sign-off: where the evidence is. |
ChecklistItemOut
One task as one month's close asks for it.
| Name | Type | Description |
|---|---|---|
assignee_emailRequired | string or null | The owner's address in these books, when there is an owner. |
assignee_idRequired | string or null | An id that starts with |
blockingRequired | boolean | Whether the month's close waits on it. |
close_task_idRequired | string or null | An id that starts with |
depends_on_idsRequired | array of string | The tasks it waits on, by |
detailsRequired | string or null | How to do it, when the task says. |
due_daysRequired | integer or null | The task's due day, in days after each month ends, or null. |
due_onRequired | string (date) or null | The day it falls due for this month, or null for no due day. |
is_overdueRequired | boolean | Not signed off, and its due day has passed. |
noteRequired | string or null | What the person who signed it off wrote beside it: the evidence. |
signed_offRequired | boolean | Whether it is signed off for this month. |
signed_off_atRequired | string (date-time) or null | When it was signed off. |
signed_off_byRequired | string or null | An id that starts with |
signed_off_by_emailRequired | string or null | The address of whoever signed it off, while they are a member of these books. |
task_idRequired | string or null | An id that starts with |
titleRequired | string | The task's title; on a closed month, as it stood when the month closed. |
waits_on_idsRequired | array of string | Of those, the ones not yet signed off this month: until they are, it cannot be. |