Acreum Docs
General ledger

Accounting Periods

List accounting periods

GET
/v1/accounting-periods

Required scope: accounting:read

Pagination: cursor

Error codes: INVALID_CURSOR, VALIDATION_FAILED, FORBIDDEN

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

legal_entity_id?string

Filter to a specific legal entity.

status?string
Value in"open""closed""locked"
from_date?string

Inclusive lower bound on the period start date.

Formatdate
to_date?string

Inclusive upper bound on the period start date.

Formatdate
from?stringDeprecated

Deprecated alias for from_date (inclusive lower bound on the period start date).

Formatdate
to?stringDeprecated

Deprecated alias for to_date (inclusive upper bound on the period start date).

Formatdate
cursor?string
limit?number

1..100, default 50

sort?string

Default: start_date

Value in"start_date""-start_date"

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods'
{  "data": [    {      "closed_at": "string",      "closed_by": "string",      "created_at": "string",      "end_date": "2019-08-24",      "id": "string",      "legal_entity_id": "string",      "locked_at": "string",      "locked_by": "string",      "period_name": "string",      "start_date": "2019-08-24",      "status": "open"    }  ],  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
POST
/v1/accounting-periods/close-readiness/bulk

Per entity: how far its books are closed, how many open periods end on or before through_date, and what blocks the next one. A pure read; writes nothing. POST because the id list does not fit a query string.

Required scope: accounting:read

Error codes: VALIDATION_FAILED

Authorization

access-token
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
legal_entity_ids*array<>

At least one legal entity id, at most 500. The cap exists for query planning, not merely payload size: each entity adds one OR branch to the readiness reads' pending-document/dead-delivery scans, and a 500-branch OR over a busy documents table can degrade to a sequential scan.

Items1 <= items <= 500
through_date*string

Inclusive: every open period ending on or before this date is in scope.

Formatdate

Response Body

application/json
  1. response
data*array<>
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/close-readiness/bulk' \  -H 'Content-Type: application/json' \  -d '{  "legal_entity_ids": [    "66349575-4160-4a79-b2da-3eb801e491dd"  ],  "through_date": "2019-08-24"}'
{  "data": [    {      "blockers": [        {          "contract_id": "9aafc1a8-e497-46c9-ba0b-bd5b03c353e4",          "delivery_id": "9892f438-d31c-4ff2-bc84-146525b292ff",          "event_effective_date": "2019-08-24",          "event_type": "activated",          "kind": "dead_lifecycle_delivery",          "last_error": "string",          "participant": "string"        }      ],      "can_close": true,      "closed_through": "2019-08-24",      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "next_period_id": "33d8cdb6-214c-4218-ad8a-7e6decbbe207",      "periods_behind": 0    }  ],  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting-periods/close-runs

Newest first. ids returns exactly those rows and overrides search; search matches status — the only low-cardinality column a run has (principal_id is a uuid, not meaningfully substring-searchable).

Required scope: accounting:read

Pagination: cursor

Error codes: INVALID_CURSOR, VALIDATION_FAILED, FORBIDDEN

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

cursor?string
limit?number

1..100, default 100

Range1 <= value <= 100
sort?"-created_at"

Default: -created_at

Value in"-created_at"
search?string

Case-insensitive substring match on: status.

ids?string

Up to 100 ids; returns those rows regardless of other filters and ignores search.

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods/close-runs'
{  "data": [    {      "cancel_requested_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "entities_closed": 0,      "entities_failed": 0,      "entities_skipped": 0,      "entities_total": 0,      "finished_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "periods_closed": 0,      "principal_id": "b0fe3bdd-8201-445a-aab3-a018692d6aca",      "started_at": "2019-08-24T14:15:22Z",      "status": "queued",      "through_date": "2019-08-24"    }  ],  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
POST
/v1/accounting-periods/close-runs

Commits a selection of legal entities and a through_date, then fans out one durable job per entity (spec D8) that closes its open periods ending on or before through_date, oldest first. A blocker stops that entity without aborting the others (D3). At most one run may be queued or running per org at a time (D10); a second create is refused with PERIOD_CLOSE_RUN_ALREADY_ACTIVE naming the run that holds the slot. There is no bulk override: the single-period period_override_reason has no counterpart here (D4) — a single sentence must never freeze hundreds of entities' known-wrong figures at once.

Required scope: accounting:write

Error codes: VALIDATION_FAILED, PERIOD_CLOSE_RUN_ALREADY_ACTIVE, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
legal_entity_ids*array<>

At least one legal entity id, at most 500 (spec D11, the same BULK_MAX used by close-readiness/bulk).

Items1 <= items <= 500
through_date*string

Inclusive: every open period ending on or before this date is in scope.

Formatdate

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/close-runs' \  -H 'Content-Type: application/json' \  -d '{  "legal_entity_ids": [    "66349575-4160-4a79-b2da-3eb801e491dd"  ],  "through_date": "2019-08-24"}'
{  "data": {    "cancel_requested_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "entities_closed": 0,    "entities_failed": 0,    "entities_skipped": 0,    "entities_total": 0,    "finished_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "periods_closed": 0,    "principal_id": "b0fe3bdd-8201-445a-aab3-a018692d6aca",    "started_at": "2019-08-24T14:15:22Z",    "status": "queued",    "through_date": "2019-08-24"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting-periods/close-runs/{id}

The run's own counters plus one cursor page of its entity rows (meta.next_cursor pages entities, in a stable but arbitrary order — by id, which is a random uuid, not a time-ordered one). Another organization's run id answers 404, the same as an unknown one.

Required scope: accounting:read

Pagination: cursor

Error codes: PERIOD_CLOSE_RUN_NOT_FOUND, INVALID_CURSOR, VALIDATION_FAILED

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Query Parameters

cursor?string
limit?number

1..100, default 50

sort?"id"

Default: id

Value in"id"

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods/close-runs/string'
{  "data": {    "cancel_requested_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "entities": [      {        "blocker_kind": "string",        "detail": "string",        "finished_at": "2019-08-24T14:15:22Z",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",        "periods_closed": 0,        "result": "applied"      }    ],    "entities_closed": 0,    "entities_failed": 0,    "entities_skipped": 0,    "entities_total": 0,    "finished_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "periods_closed": 0,    "principal_id": "b0fe3bdd-8201-445a-aab3-a018692d6aca",    "started_at": "2019-08-24T14:15:22Z",    "status": "queued",    "through_date": "2019-08-24"  },  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
POST
/v1/accounting-periods/close-runs/{id}/cancel

Cooperative cancel (D9): stamps cancel_requested_at, and the run comes back TERMINAL — status is set to 'cancelled' and finished_at is stamped in this same call, which is what releases the org's single active-run slot (D10). Without that, a run whose remaining jobs never start would hold the slot forever, since nothing else would ever terminalize it. Each entity job still mid-flight reads the stamp before doing further work and records itself cancelled; an entity already applied keeps its result and its periods — cancel means "stop starting new work", never "undo". Cancelling a run that is already terminal (completed, cancelled or failed) is a NO-OP: it returns the run unchanged, rather than an error, because there is no work left to stop.

Required scope: accounting:write

Error codes: PERIOD_CLOSE_RUN_NOT_FOUND

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/close-runs/string/cancel'
{  "data": {    "cancel_requested_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "entities_closed": 0,    "entities_failed": 0,    "entities_skipped": 0,    "entities_total": 0,    "finished_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "periods_closed": 0,    "principal_id": "b0fe3bdd-8201-445a-aab3-a018692d6aca",    "started_at": "2019-08-24T14:15:22Z",    "status": "queued",    "through_date": "2019-08-24"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting-periods/exceptions

Required scope: accounting:read

Pagination: cursor

Error codes: INVALID_CURSOR, FORBIDDEN

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

from_date?string

Inclusive lower bound on the exception occurrence date.

Formatdate
to_date?string

Inclusive upper bound on the exception occurrence date.

Formatdate
from?stringDeprecated

Deprecated alias for from_date (inclusive lower bound on the exception occurrence date).

Formatdate
to?stringDeprecated

Deprecated alias for to_date (inclusive upper bound on the exception occurrence date).

Formatdate
legal_entity_id?string
cursor?string
limit?number

1..100, default 50

sort?string

Default: -created_at

Value in"-created_at""created_at"

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods/exceptions'
{  "data": [    {      "action": "period.override_post",      "actor_kind": "user",      "actor_principal_id": "string",      "changes_summary": {},      "created_at": "string",      "id": "string",      "resource_id": "string",      "resource_type": "string"    }  ],  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
GET
/v1/accounting-periods/{id}

Required scope: accounting:read

Error codes: NOT_FOUND

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods/string'
{  "data": {    "closed_at": "string",    "closed_by": "string",    "created_at": "string",    "end_date": "2019-08-24",    "id": "string",    "legal_entity_id": "string",    "locked_at": "string",    "locked_by": "string",    "period_name": "string",    "start_date": "2019-08-24",    "status": "open"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Close accounting period

POST
/v1/accounting-periods/{id}/close

Closes the period. Refused with PERIOD_HAS_DEAD_LIFECYCLE_DELIVERIES when a lease lifecycle change affecting this period was never delivered to a module that computes posted amounts; supply period_override_reason with the accounting:periods_override scope to close anyway, which records a period.override_close audit row naming every blocker. Call GET :id/close-readiness to see blockers before attempting the close.

Required scope: accounting:write

Error codes: NOT_FOUND, CONFLICT, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT, PERIOD_HAS_DEAD_LIFECYCLE_DELIVERIES, PERIOD_HAS_PENDING_DOCUMENTS, PERIOD_OVERRIDE_FORBIDDEN

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
note?string

Optional operator note recorded with the state change.

period_override_reason?string

Required only when the period has close blockers. Recorded in the audit log as period.override_close alongside every blocker it stepped over, and requires the accounting:periods_override scope. Same field name and consent semantics as CreateDocumentDto.period_override_reason on the posting path.

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/string/close' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "closed_at": "string",    "closed_by": "string",    "created_at": "string",    "end_date": "2019-08-24",    "id": "string",    "legal_entity_id": "string",    "locked_at": "string",    "locked_by": "string",    "period_name": "string",    "start_date": "2019-08-24",    "status": "open"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/accounting-periods/{id}/close-readiness

Preconditions for closing this period, so blockers are visible while the month is open rather than at the moment someone presses Close. dead_lifecycle_delivery is a lease lifecycle change that was never delivered to a module computing posted amounts; depreciation_not_posted is a period with projected fixed-asset depreciation and no run covering it; pending_documents lists posting_pending documents dated in this period, including incoming intercompany documents from another legal entity; previous_period_not_closed appears only when the org enforces sequential close and the prior period in the same legal entity is still open. warnings never block close: percentage_rent_attention counts percentage rent runs due and lines blocked, held, or approved but not yet invoiced.

Required scope: accounting:read

Error codes: NOT_FOUND

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/accounting-periods/string/close-readiness'
{  "data": {    "blockers": [      {        "contract_id": "9aafc1a8-e497-46c9-ba0b-bd5b03c353e4",        "delivery_id": "9892f438-d31c-4ff2-bc84-146525b292ff",        "event_effective_date": "2019-08-24",        "event_type": "activated",        "kind": "dead_lifecycle_delivery",        "last_error": "string",        "participant": "string"      }    ],    "can_close": true,    "warnings": [      {        "approved_unbilled": 0,        "kind": "percentage_rent_attention",        "lines_blocked": 0,        "lines_held": 0,        "lines_pending": 0,        "runs_due": 0      }    ]  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Lock accounting period

POST
/v1/accounting-periods/{id}/lock

Required scope: accounting:write

Error codes: NOT_FOUND, CONFLICT, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
note?string

Optional operator note recorded with the state change.

period_override_reason?string

Required only when the period has close blockers. Recorded in the audit log as period.override_close alongside every blocker it stepped over, and requires the accounting:periods_override scope. Same field name and consent semantics as CreateDocumentDto.period_override_reason on the posting path.

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/string/lock' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "closed_at": "string",    "closed_by": "string",    "created_at": "string",    "end_date": "2019-08-24",    "id": "string",    "legal_entity_id": "string",    "locked_at": "string",    "locked_by": "string",    "period_name": "string",    "start_date": "2019-08-24",    "status": "open"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
POST
/v1/accounting-periods/{id}/reopen

Required scope: accounting:periods_override

Error codes: NOT_FOUND, CONFLICT, VALIDATION_FAILED, FORBIDDEN, PERIOD_LOCKED_BY_YEAR_END_CLOSE, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
reason*string

Required reason for reopening a closed or locked period. Persisted on the audit_log row.

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/accounting-periods/string/reopen' \  -H 'Content-Type: application/json' \  -d '{  "reason": "string"}'
{  "data": {    "closed_at": "string",    "closed_by": "string",    "created_at": "string",    "end_date": "2019-08-24",    "id": "string",    "legal_entity_id": "string",    "locked_at": "string",    "locked_by": "string",    "period_name": "string",    "start_date": "2019-08-24",    "status": "open"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}