Skip to main content

Prototype sales invoice for a creation form

POST 

/api/v2/sales-invoices/new

Returns a NON-PERSISTED sales invoice pre-populated with the backend defaults the legacy form applies on 'new invoice': currencies and daily exchange rate of the branch's company, default accounting ledger, automatic document/accounting dates per company configuration, loyalty point value, Verifactu draft state (lifecycle BOR + series BORRADOR) when the company has Verifactu active, a PROVISIONAL series/number pair (re-derived at persist time) and the authenticated user's employee as agent or optometrist. The response carries no id, version or audit fields. The optional JSON body supplies initialisation hints: warehouseId (defaults to the user's current branch) and counterpartyId. Caller must follow up with POST /api/v2/sales-invoices to actually persist the invoice.

Request​

Responses​

Sales invoice prototype with defaults