Update Generation Switch
PUT/api/ledger/settings/generation
Flip the per-tenant generation kill switch (AccountingSettings::$ledger_generation_enabled) and return the refreshed status.
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 entriesgenerate_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 runschedule.next_reconcile_run_at— UTC datetime of the next daily reconciliation sweep
Request
Responses
- 200
- 401
- 403
- 422
- 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.
Unprocessable Content
Response Headers
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.