Update Document Numbering Settings
PUT/api/ledger/settings/document-numbering
Save how NEW sales invoices are numbered on the active accounting connection.
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 mintsINV-{id}), orprovider_assigned(push no number; QuickBooks/Xero assigns one)prefix(string, optional, nullable) — prepended undersource_reference. Max 8 characters, letters/numbers/dashes/underscores only. Omit or sendnull/""for no prefix. Ignored by the other strategiescollision_suffix_enabled(boolean, optional, defaulttrue) —truedisambiguates a reference already in use (SO-1001-2);falsefalls back toINV-{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
- 200
- 401
- 403
- 404
- 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.
Not Found
Response Headers
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.