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

E044: Create customer

POST /api/customers

Creates a new customer record. Triggered from the Customers page, "New customer". Classification rows (type, segment, broker) and parent (for hierarchy) are optional but, if supplied, must already exist in this org.

Authentication

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

Request

{ "name": "Acme Foods", "code": "ACME", "customerTypeId": "uuid", "customerSegmentId": "uuid", "brokerId": null }

Response — 201 Created

{ "id": "uuid", "name": "Acme Foods", "code": "ACME", "customerTypeId": "uuid", "customerSegmentId": "uuid", "brokerId": null, "isActive": true, "createdAt": "..." }

Errors

HTTPcodeCondition
404not_foundCustomer type / segment / broker not found.
422validation_failedDuplicate code within org, or shape invalid.

Workflow

Calls W044 Create customer.