vsmsconnect — API — auto-fiscalise

← all endpoints

PATCH/api/v1/accounting/auto-fiscalise auth: jwt (administrator)

Toggle the per-business Businesses.AutoFiscaliseInvoices flag (DB default 1). When on, every newly-inserted eligible invoice from any sync path (manual Sync Now, webhook, scheduled poll) is dispatched to TaxCore automatically. Fires AUTO_FISCALISE_ENABLED / AUTO_FISCALISE_DISABLED audit. Reflected on GET /accounting/{provider}/status.autoFiscaliseInvoices so the app can render the switch alongside connection state. Manual fiscalisation via POST /fiscalisation-jobs remains available regardless.

handlers: AutoFiscaliseController.update

Inputs

Request body type: AutoFiscaliseUpdateBody

namerequireddefaultdescription
enabled body
boolean
yes—true → auto-fiscalise on incoming invoices; false → manual review only.

Outputs

200
APIResponseDataObject<SetAutoFiscaliseResult>
Persisted result (typically { enabled: boolean }).
401
APIError
AUTH_UNAUTHORIZED — caller has no JWT user.
409
APIError
BUSINESS_CONTEXT_REQUIRED — no businessId on the JWT.
422
APIError
VALIDATION_ERROR — enabled not a boolean.