Skip to main content

Update Generation Switch

PUT 

/api/ledger/settings/generation

Flip the per-tenant generation kill switch (AccountingSettings::$ledger_generation_enabled) and return the refreshed status.

Authorization

Any valid API token can call this endpoint — no specific scope required. Manage tokens.

Authentication: Requires Bearer token + accounting.manage_settings permission (403 without it).

Request body:

  • enabled (boolean, required) — whether this tenant generates accounting entries
  • generate_purchase_order_transactions (boolean, optional) — per-tenant opt-in for the non-posting PURCHASE_ORDER commitment entry (AccountingSettings::$generate_purchase_order_transactions, default false). Off by default. Omit to leave it unchanged; set true to opt in so a PURCHASE_ORDER commitment entry is generated per PO. When false (the default) the PURCHASE_ORDER posting rule returns null and no PO entries are generated (existing ones are left untouched).

Note: the LEDGER_GENERATION_ENABLED environment override is not writable from the API — disabling the tenant switch while the override is on leaves generation effectively running, which the response surfaces via environment_override.

  • 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