Purchase Orders
Create, read, update and delete supplier purchase orders (pedidos a proveedor)
📄️ Get purchase order by ID
Returns a single purchase order by its primary key, including line items and payments. Returns 404 when the requested ID belongs to a sales (issued) document.
📄️ Update purchase order
Full replacement of an existing purchase order. Send the `If-Match` header with the current ETag for optimistic concurrency control. The `issued` flag is forced to `false` server-side.
📄️ Delete purchase order
Deletes a purchase order. Send the `If-Match` header with the current ETag for optimistic concurrency control.
📄️ Merge-patch purchase order
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 orders
Returns a paginated list of supplier purchase orders 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 order
Creates a new supplier purchase order with the provided data and optional line items and payments. The `issued` flag is forced to `false` server-side regardless of the request payload.