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
Authorization
The following custom headers are required:x-tokenx-brandx-venueContent-Type: application/json
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
Customer’s full name. This field is required.
Customer’s email address.
Customer’s primary phone number. Must be unique across all customers.
Customer code/identifier. Must be unique across all customers.
Customer UUID identifier. Must be unique across all customers. If not provided, the system will generate one automatically.
Additional notes or description about the customer.
ID of the customer group to assign this customer to.
Customer’s gender. Use
1 for male, 2 for female, or null for unspecified.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
| Field | Type | Description |
|---|---|---|
name | string | Customer’s full name. |
Optional Fields
| Field | Type | Description |
|---|---|---|
email | string | Customer’s email address. |
phone | string | Primary phone number. Must be unique. |
code | string | Customer code/identifier. Must be unique. |
cid | string | Customer UUID. Must be unique. Auto-generated if not provided. |
description | string | Additional notes about the customer. |
group_id | integer | ID of the customer group. |
gender | integer | Gender: 1 = male, 2 = female, null = unspecified. |
date_of_birth | string | Date of birth in YYYY-MM-DD format. |
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. - Upon successful creation, the customer is automatically assigned a
balance_idand a balance account is created. - 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.
Authorizations
Access token obtained from /auth endpoint
Brand identifier
Venue identifier
Body
application/json
Customer details
Customer's full name (required)
Example:
"John Doe"
Customer's email address
Example:
Customer's primary phone number. Must be unique.
Example:
"+15551234567"
Customer code/identifier. Must be unique.
Example:
"CUST001"
Customer UUID identifier. Must be unique. Auto-generated if not provided.
Example:
"0f9654bc-9520-43d7-8109-317d9820f54c"
Additional notes or description about the customer
Example:
"Test Customer"
ID of the customer group to assign this customer to
Example:
1
Customer's gender: 1 = male, 2 = female, null = unspecified
Example:
1
Customer's date of birth in YYYY-MM-DD format
Example:
"1990-05-15"