Skip to main content

Get Generation Status

GET 

/api/ledger/settings/generation

Effective state of the ledger-generation kill switch plus outbox health (the Settings → Generation card).

Authorization

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 override
  • tenant_enabled — the per-tenant switch (AccountingSettings::$ledger_generation_enabled)
  • environment_override — the LEDGER_GENERATION_ENABLED env flag; when true, generation runs for every tenant on the install regardless of the tenant switch
  • generate_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 entries
  • outbox.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 run
  • schedule.next_reconcile_run_at — UTC datetime of the next daily reconciliation sweep

Request

Responses

OK

Response Headers
    Content-Type