E049: Create customer type
POST /api/customer-types
Adds a new customer type (for example, Purchaser, Location). Triggered from Settings, Customer types.
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Admin.
Request
{ "name": "Distributor", "displayOrder": 1 }
Response — 201 Created
{ "id": "uuid", "name": "Distributor", "displayOrder": 1 }
Errors
| HTTP | code | Condition |
|---|---|---|
| 422 | validation_failed | Duplicate name. |
Workflow
Calls W049 Create customer type.