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.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

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

Request body:

  • enabled (boolean, required) — whether this tenant generates accounting entries

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
  • purchase_order_accounting_policy (string, optional) — what a purchase order puts into the books. One of on_invoice (nothing posts until the supplier invoice is recorded — the default), commitment_entry (a non-posting commitment entry per order), or committed_spend_bill (a committed-spend bill when the order is submitted, which reduces as real supplier invoices arrive). Omit to leave unchanged. Replaces the former boolean generate_purchase_order_transactions.

The response also reports the live committed-spend bills (committed_spend_bill_count, committed_spend_bill_total, tenant_currency_code) so a client can state exactly what switching away from that policy would remove.

Request

Responses

OK

Response Headers
    Content-Type