Purchase Orders
Create purchase order
Creates a new purchase order in DRAFT status, optionally with initial lines. Returns 201 on creation, 200 when idempotency_key matched an existing PO.
POST
string
required
API key with
inventory:write scope.string
required
Vendor UUID.
string
UUID of the receiving store. Exactly one of
store_id, external_store_id, or store_tax_id must be provided.string
Resolve the store by the cross-system external identifier. Mutually exclusive with
store_id and store_tax_id.string
Resolve the store by its fiscal identifier (RUC, CNPJ, CUIT, NIT, RUT, RFC…). Returns
422 if multiple active stores share the same value — use store_id or external_store_id to disambiguate. Mutually exclusive with store_id and external_store_id.string
UUID of the supplier. Exactly one of
supplier_id or external_supplier_id must be provided.string
External supplier identifier (e.g. RUC / tax id), resolved server-side. Mutually exclusive with
supplier_id.string
UUID of the receiving schedule this PO belongs to (optional).
string
Free-form order classification (max 64 chars).
string
ISO 8601 timestamp of the order cutoff.
string
ISO 8601 timestamp of the expected delivery.
string
Free-text notes (max 1024 chars).
object
Free-form extra data.
string
Client-supplied key (max 255 chars). Repeating the same key returns the existing PO with HTTP 200 instead of creating a duplicate. Recommended: one UUID v4 per business operation.
string
Client-supplied document reference (e.g. an ERP movement code, max 256 chars). Stored for lookup and display, filterable on the list endpoint. Not a deduplication key — use
idempotency_key for that.string
Caller’s user identifier for the audit trail. Optional on creation; required on
close.boolean
When
true, every line item must exist in the supplier’s catalog.object[]
Initial order lines (optional — you can add them later with
action=add-lines):object
The full purchase order detail: identifiers,
status, lifecycle timestamps (submitted_at, confirmed_at, cancelled_at, closed_at), actor fields, and lines[].
