E047: Update customer
PATCH /api/customers/:id
Edits a customer's header fields, including classifiers and the parent link. Triggered from Customer Detail.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
{ "name": "...", "customerTypeId": "uuid", "customerSegmentId": "uuid", "brokerId": null, "isActive": true }
Passing isActive archives (false) or reactivates (true) the customer; all fields are optional.
Response — 200 OK
{ "id": "uuid", "name": "Acme Foods", "code": "ACME", "customerTypeId": "uuid", "customerSegmentId": "uuid", "brokerId": null, "isActive": true, "createdAt": "..." }
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such customer. |
| 422 | validation_failed | Shape invalid. |
Workflow
Calls W047 Update customer.