Skip to main content
POST
/
customers
Create customer
curl --request POST \
  --url https://integrations.clopos.com/open-api/customers \
  --header 'Content-Type: application/json' \
  --header 'x-brand: <api-key>' \
  --header 'x-token: <api-key>' \
  --header 'x-venue: <api-key>' \
  --data '
{
  "name": "John Doe"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "email": "[email protected]",
    "phone": "<string>",
    "group_id": 123,
    "balance": {
      "id": 123,
      "amount": 123,
      "type": "<string>"
    },
    "cashback_balance": {
      "id": 123,
      "amount": 123,
      "type": "<string>"
    },
    "group": {
      "id": 123,
      "name": "<string>",
      "discount_type": "<string>",
      "discount_value": 123,
      "system_type": "<string>",
      "total_amount": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z"
    },
    "created_at": "2023-11-07T05:31:56Z"
  },
  "message": "<string>",
  "time": 123,
  "timestamp": "2023-11-07T05:31:56Z",
  "unix": 123
}

Authorizations

x-token
string
header
required

Access token obtained from /auth endpoint

x-brand
string
header
required

Brand identifier

x-venue
string
header
required

Venue identifier

Body

application/json

Customer details

name
string
required

Customer's full name (required)

Example:

"John Doe"

email
string<email>

Customer's email address

phone
string

Customer's primary phone number. Must be unique.

Example:

"+15551234567"

code
string

Customer code/identifier. Must be unique.

Example:

"CUST001"

cid
string<uuid>

Customer UUID identifier. Must be unique. Auto-generated if not provided.

Example:

"0f9654bc-9520-43d7-8109-317d9820f54c"

description
string

Additional notes or description about the customer

Example:

"Test Customer"

group_id
integer

ID of the customer group to assign this customer to

Example:

1

gender
integer | null

Customer's gender: 1 = male, 2 = female, null = unspecified

Example:

1

date_of_birth
string<date>

Customer's date of birth in YYYY-MM-DD format

Example:

"1990-05-15"

Response

Customer created successfully

success
boolean
data
object
message
string
time
integer
timestamp
string<date-time>
unix
integer