Stoneware
ProductSolutionsDocumentationDevelopersSecuritySign inBook demo
Developers/POST /purchase-orders

POST /purchase-orders

Purchasing mutation.

POST/purchase-orders

Base operational scope: manage_slab_purchasing. Existing workflow services can require additional permission or state preconditions.

Accepted top-level fields

supplier_idsupplier_referenceorder_dateexpected_ship_dateexpected_arrival_datecurrency_idexchange_rateexchange_rate_datediscounttax_ratenotesitems

This list is from the verified endpoint registry. The packaged OpenAPI contract remains authoritative for nested schemas, enum values and required fields.

Write requirements

  • Content-Type: application/json on every write.
  • A UUID Idempotency-Key generated once per logical operation.
  • On an unknown outcome, retry the exact same method, path, payload and key.
  • Do not send company/actor identity overrides or fabricated workflow statuses.

Request patterns

REQUEST_BODY is intentionally schema-neutral here. Use the accepted field list and packaged OpenAPI contract for exact value types, nested schemas and required fields.

cURL pattern
curl -X POST 'https://your-company.example/api/slab/v1/operations/purchase-orders' \
  -H 'Authorization: Bearer YOUR_OPERATIONAL_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: YOUR_UUID' \
  --data '{
  "supplier_id": "…",
  "supplier_reference": "…"
}'

Common outcomes

  • 403 — effective token/employee authority does not permit the operation.
  • 409 — idempotency/replay conflict or changed effective authority.
  • 422 — validation or workflow precondition failed; correct the state or payload rather than forcing a status.
  • 429 — rate limited; retry according to response guidance.
  • 500 — retain the same idempotency key for an unknown outcome and record the request ID.