Skip to main content

Get Document Numbering Settings

GET 

/api/ledger/settings/document-numbering

How NEW sales invoices are numbered on the active accounting connection (Settings → Document Numbering).

Not yet available to API tokens

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

Authentication: Requires Bearer token.

Response fields:

  • document_numbering.sales_invoice_strategy — one of source_reference, system, provider_assigned
  • document_numbering.prefix — optional string prepended to the number under the source_reference strategy (max 8 chars, A-Z a-z 0-9 - _). Empty string = no prefix
  • document_numbering.collision_suffix_enabled — when a source reference is already in use by another document, true disambiguates it (SO-1001-2); false falls back to SKU's own scheme (INV-{id}) for that document. A number always identifies exactly one document either way
  • strategies[] — the pickable options (value, label, description) for rendering the selector
  • connection_id / connection_name — the accounting connection these settings belong to; both null when none is configured

No accounting connection: returns 200 with the defaults a new connection would get (source_reference, no prefix, collision suffix on) and null connection fields — it does NOT 404. Only the PUT 404s.

Scope: the strategy governs sales invoices only, and only the NEXT document. Bills, credit notes and batch invoices always use SKU's own scheme (they have no single source number to borrow without colliding), and changing the setting never renumbers a document that has already been issued — an issued number is frozen and inherited by every later correction of that document.

Request

Responses

OK

Response Headers
    Content-Type