Skip to main content
Version: v1.0.0(int)

E114: Update purchase order

PATCH /api/purchase-orders/:id

Edits a PO's header fields, including status and lifecycle timestamps. Triggered from the Purchase Order Detail page. Status is patched directly; a validated transition map and status-driven ledger side effects are a v1 gap (see W114). Partial / Received are normally computed by the receipt workflow (W122).

Authentication

Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.

Request

{
"expectedDeliveryDate": "2026-05-27",
"status": "In Transit",
"notes": "..."
}

All fields optional; only present fields update. status accepts any of the seven org.po_status values (Planning, Placed, In Transit, Partial, Received, Paid, Cancelled); transition validation is a v1 gap. vendorId, targetType, and poNumber are not patchable.

Response — 200 OK

{
"id": "uuid",
"poNumber": "PO-2026-0042",
"vendorId": "uuid",
"targetType": "materials",
"shipToLocationId": "uuid",
"status": "In Transit",
"orderDate": "2026-05-18",
"expectedDate": "2026-05-25",
"costs": 1234.56,
"shippingCosts": 50.00,
"setupCosts": 0.00,
"notes": "..."
}

Errors

HTTPcodeCondition
404not_foundNo such PO.
422validation_failedField shape invalid.

Workflow

Calls W114 Update purchase order.