Get Generation Status
GET/api/ledger/settings/generation
Effective state of the ledger-generation kill switch plus outbox health (the Settings → Generation card).
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Authentication: Requires Bearer token.
Response fields:
enabled— the EFFECTIVE state: tenant switch OR the environment overridetenant_enabled— the per-tenant switch (AccountingSettings::$ledger_generation_enabled)environment_override— theLEDGER_GENERATION_ENABLEDenv flag; when true, generation runs for every tenant on the install regardless of the tenant switchgenerate_purchase_order_transactions— per-tenant opt-in (AccountingSettings::$generate_purchase_order_transactions, default false) for the non-posting PURCHASE_ORDER commitment entry; off by default — when true a PURCHASE_ORDER commitment entry is generated per PO, when false (the default) the PURCHASE_ORDER posting rule returns null so no PO entries are generated (existing ones are left untouched)outbox.pending— document changes waiting to be turned into ledger entriesoutbox.failed— outbox rows that exhausted their retry budget (terminal)outbox.last_processed_at— last time the generation worker completed a row (null = never)schedule.next_generation_run_at— UTC datetime of the next per-minute outbox drain runschedule.next_reconcile_run_at— UTC datetime of the next daily reconciliation sweep
Request
Responses
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.