Purpose
Create a new customer in the Clopos system. This endpoint allows you to register customers with their contact information, assign them to customer groups, and set up their profile details.HTTP Request
The fields
code, phone, and cid are unique. If you attempt to create a customer with duplicate values for any of these fields, the API will return an error.Request Body
string
required
Customer’s full name. This field is required.
string
Customer’s email address.
string
Customer’s primary phone number. Must be unique across all customers.
string
Customer code/identifier. Must be unique across all customers.
string
Customer UUID identifier. Must be unique across all customers. If not provided, the system will generate one automatically.
string
Additional notes or description about the customer.
integer
ID of the customer group to assign this customer to.
integer
Customer’s gender. Use
1 for male, 2 for female, or null for unspecified.string
Customer’s date of birth in
YYYY-MM-DD format.Request Examples
Response
200 OK — Customer created successfully
400 Bad Request — Validation error
409 Conflict — Duplicate unique field
Field Reference
Required Fields
Optional Fields
Response Fields
Notes
- The
namefield is required and cannot be empty. - The fields
code,phone, andcidmust be unique. Attempting to create a customer with duplicate values will result in a409 Conflicterror. - If
cidis not provided, the system will automatically generate a UUID for the customer. - The response includes the customer’s group information if
group_idwas provided. - The
can_use_loyalty_systemandis_verifiedfields are set tofalseby default for new customers.