Numbering
SendInvoiceNumber as "Next" to generate it automatically:
EInvoiceType0(not an e-document): the SATFATNO number series.EInvoiceType1(e-Invoice),2(e-Archive) or5(e-Producer-receipt): the company’s e-Invoice numbering (a fixed prefix, the year and a 9-digit sequence, for exampleEDD2026000000014) — a default numbering definition for the matching type must exist for the company, otherwise the request fails (3080).
"Next" cannot be sent on update, and InvoiceNumber must be unique in the company among sales invoices.
Warehouse movement
Every line’s generated warehouse movement is outbound for a sales invoice (stock decreases), soLots/SerialNumbers follow the outbound rules: a Lot-tracked product (StockType 3) names the lot to consume from, a FIFO/LIFO/FEFO product leaves Lots empty and the API selects lots automatically, and serial numbers must already be registered and not yet dispatched.
Customer ledger
A sales invoice’s customer ledger entry is always a debit (a sales invoice increases what the customer owes the company). If it has already been closed by a collection, the invoice’s customer, amount and currency can no longer be changed, and the invoice cannot be deleted (3016).