Skip to main content

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

This endpoint requires authentication. Include your JWT in the x-token header. See Authentication for how to obtain a token and Errors for error responses.
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 name field is required and cannot be empty.
  • The fields code, phone, and cid must be unique. Attempting to create a customer with duplicate values will result in a 409 Conflict error.
  • If cid is not provided, the system will automatically generate a UUID for the customer.
  • The response includes the customer’s group information if group_id was provided.
  • The can_use_loyalty_system and is_verified fields are set to false by default for new customers.