> ## 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.

# Purchase Return Invoices

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

A purchase return 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 purchase return invoice.

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

## Numbering

<Warning>
  This invoice type has **no plain number series** (unlike the other three invoice types). `EInvoiceType` must be `1` (e-Invoice) or `2` (e-Archive) when `InvoiceNumber` is `"Next"` — sending `0` with `"Next"` is rejected. `InvoiceNumber` can otherwise always be given manually.
</Warning>

Send `InvoiceNumber` as `"Next"` with `EInvoiceType` `1` or `2` to generate it from the company's e-Invoice numbering (a fixed prefix, the year and a 9-digit sequence). `"Next"` cannot be sent on update, and `InvoiceNumber` must be unique in the company among purchase return 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 purchase return invoice (goods are sent back to the supplier, so stock decreases), so `Lots`/`SerialNumbers` follow the outbound rules.

<Info>
  No real purchase return invoices exist yet in the data used to build this API, so the outbound direction of the generated warehouse movement is inferred from the inbound/outbound convention of the other invoice types, not directly verified. Report any discrepancy you find.
</Info>

## Customer ledger

A purchase return invoice's [customer ledger entry](/en/v1/purchase-invoices/overview#customer-ledger) is a **debit** (it reverses the credit a purchase invoice would have created). If it has already been closed by a payment, the invoice's customer, amount and currency can no longer be changed, and the invoice cannot be deleted (`3016`).
