Mediloop
DocsAPIsProcurement APIPurchase Orders
Procurement API

Purchase Orders

Create and manage auditable purchase orders from draft through supplier acknowledgement and fulfilment.

Auth

OAuth 2.0 / scoped access

Idempotency

Supported on writes

Audit

Lifecycle history

Rate limit

100 requests / min

Order lifecycle

Draft

Build the order

Validate

Check supplier, terms and quantities

Approve

Apply purchasing approvals

Submit

Send to supplier

Fulfil

Track acknowledgement and delivery

Create an order

POST/v1/purchase-orders
GET/v1/purchase-orders/{id}
PATCH/v1/purchase-orders/{id}
POST/v1/purchase-orders/{id}/cancel
GET/v1/purchase-orders

Order lines

FieldTypeDescription
product_iduuidMediloop product reference
supplier_product_iduuidSupplier offer/catalog item
quantitydecimalRequested order quantity
uomstringUnit of measure / pack
unit_pricemoneyResolved commercial price
agreement_iduuid?Applied price agreement when relevant

Approval & submission

Separate drafting from submission. Organization permissions and internal purchasing approvals should be resolved before the order becomes visible to the supplier. Preserve the effective approver, membership and tenant context in the audit trail.

Order status

draft

Editable

submitted

Awaiting supplier

acknowledged

Supplier accepted

fulfilling

In fulfilment

partially_fulfilled

Partial shipment

fulfilled

Completed

cancelled

Stopped

Idempotency

Send an Idempotency-Key for create, submit and cancellation requests. Retrying the same business operation must not create duplicate orders or duplicate supplier actions.

Example request

cURLJavaScriptPython
curl -X POST "https://api.mediloop.com/v1/purchase-orders" \
  -H "Authorization: Bearer $MEDILOOP_API_KEY" \
  -H "X-Tenant-Id: $TENANT_ID" \
  -H "Idempotency-Key: po-2026-00042" \
  -H "Content-Type: application/json" \
  -d '{"supplier_id":"sup_42","lines":[{"product_id":"prod_123","quantity":20}]}'
Create a purchase order
Response201 Created
{
  "id": "po_42",
  "status": "draft",
  "supplier_id": "sup_42",
  "total": { "amount": 178.00, "currency": "EUR" }
}