Skip to main content
POST
/
customers
Create customer
curl --request POST \
  --url https://integrations.clopos.com/open-api/v2/customers \
  --header 'Content-Type: application/json' \
  --header 'x-token: <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

JWT access token obtained from /v2/auth endpoint

Body

application/json

Customer details

name
string
required
Example:

"John Doe"

email
string<email>
phone
string
Example:

"+15551234567"

code
string
Example:

"CUST001"

cid
string<uuid>
Example:

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

description
string
Example:

"Test Customer"

group_id
integer
Example:

1

gender
integer | null
Example:

1

date_of_birth
string<date>
Example:

"1990-05-15"

Response

Customer created successfully

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