Skip to main content

Update Document Numbering Settings

PUT 

/api/ledger/settings/document-numbering

Save how NEW sales invoices are numbered on the active accounting connection.

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:

  • sales_invoice_strategy (string, required) — source_reference (number the invoice after the order it came from), system (SKU mints INV-{id}), or provider_assigned (push no number; QuickBooks/Xero assigns one)
  • prefix (string, optional, nullable) — prepended under source_reference. Max 8 characters, letters/numbers/dashes/underscores only. Omit or send null/"" for no prefix. Ignored by the other strategies
  • collision_suffix_enabled (boolean, optional, default true) — true disambiguates a reference already in use (SO-1001-2); false falls back to INV-{id} for that document instead

Errors:

  • 404 — no accounting connection is configured (nothing to save the setting against)
  • 422 — unknown strategy, or a prefix that is too long or contains disallowed characters

Note: this decides the NEXT document only. Documents already issued keep their number, and every correction of one re-pushes under the number the customer already holds.

Request

Responses

OK

Response Headers
    Content-Type