Purchase Invoices
Create, read, update and delete supplier purchase invoices (facturas recibidas)
📄️ Get purchase invoice by ID
Returns a single purchase invoice by its primary key. Returns 404 when the requested ID belongs to a sales (issued) document.
📄️ Update purchase invoice
Full replacement of an existing purchase invoice. Send the `If-Match` header with the current ETag for optimistic concurrency control. The `issued` flag is forced to `false` server-side.
📄️ Delete purchase invoice
Deletes a purchase invoice. Send the `If-Match` header with the current ETag for optimistic concurrency control.
📄️ Merge-patch purchase invoice
RFC 7396 merge-patch over `application/merge-patch+json`. Send only the fields you want to change; include a field with value `null` to remove it. Use the `If-Match` header for optimistic concurrency control.
📄️ List purchase invoices
Returns a paginated list of supplier purchase invoices with envelope `{data, totalCount, skip, limit, hasMore}`. Supports optional RSQL `filter`, `sort` (default `lastModifiedAt:desc`), `skip`/`limit` pagination and `modifiedAfter`/`modifiedBefore` bookends. Limit is capped at 200; skip is clamped to >= 0. The constraint `issued==false` is always enforced server-side.
📄️ Create purchase invoice
Creates a new supplier purchase invoice with the provided data and optional line items and payments. The `issued` flag is forced to `false` server-side regardless of the request payload.