E125: Update receipt
PATCH /api/purchase-order-receipts/:id
Edits a previously-recorded PO receipt. Triggered from the Purchase Order Detail receipts section. Metadata-only edits (date, notes) are a fast path; any change to received quantities or unit costs rebuilds the ledger entries and re-runs the cost cascade so downstream values stay correct.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
{
"receiptDate": "2026-05-26",
"notes": "..."
}
Edits header fields only. Quantity / cost edits go through delete + re-create so the ledger and cost cascade stay consistent — see W125.
Response — 200 OK
{
"id": "uuid",
"poId": "uuid",
"receiptDate": "2026-05-25",
"notes": "...",
"items": [
{ "id": "uuid", "poItemId": "uuid", "quantity": 100, "unitCost": 12.34 }
]
}
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such receipt. |
| 422 | validation_failed | Field shape invalid. |
Workflow
Calls W125 Update receipt.