> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.noyax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sales Invoices

> Fields, numbering, warehouse movement and customer ledger rules of sales invoices.

A sales invoice has the same fields, lines and rules as a [purchase invoice](/en/v1/purchase-invoices/overview) — see that page for required fields, the customer snapshot, line rules, Lot/serial number tracking, line identity on update and sharing. This page only covers what is different for a sales invoice.

| Operation      | Endpoint                                                             |
| -------------- | -------------------------------------------------------------------- |
| List           | [`GET /sales-invoices`](/en/v1/sales-invoices/list)                  |
| Get            | [`GET /sales-invoices/{invoiceId}`](/en/v1/sales-invoices/get)       |
| Create         | [`POST /sales-invoices`](/en/v1/sales-invoices/create)               |
| Update         | [`PUT /sales-invoices/{invoiceId}`](/en/v1/sales-invoices/update)    |
| Partial update | [`PATCH /sales-invoices/{invoiceId}`](/en/v1/sales-invoices/patch)   |
| Delete         | [`DELETE /sales-invoices/{invoiceId}`](/en/v1/sales-invoices/delete) |

## Numbering

Send `InvoiceNumber` as `"Next"` to generate it automatically:

* `EInvoiceType` `0` (not an e-document): the **SATFATNO** number series.
* `EInvoiceType` `1` (e-Invoice), `2` (e-Archive) or `5` (e-Producer-receipt): the company's e-Invoice numbering (a fixed prefix, the year and a 9-digit sequence, for example `EDD2026000000014`) — 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](/en/v1/purchase-invoices/overview#warehouse-movement-lot-and-serial-number-tracking) is **outbound** for a sales invoice (stock decreases), so `Lots`/`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](/en/v1/purchase-invoices/overview#customer-ledger) 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`).
