Skip to content

Adding a Client

Request

Security
BearerPartnerUser
Path
location_idnumberrequired

location ID

Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

Body*/*
namestringrequired

Client name

Example:"James"
phonestringrequired

Customer phone

Example:13155550179
surnamestring

Client surname

Example:"Smith"
patronymicstring

Client patronymic (middle name). Like surname, it is ignored unless the Business User may edit client surnames and patronymics.

Example:"James"
additional_phonestring

Additional client phone. Must differ from phone and must not belong to another client of the Location. Send an empty string to clear it. It is not returned in the client card response, but quick_search in client search matches it.

emailstring

Client Email

Example:"j.smith@example.com"
sex_idnumber

Gender of the client (1 - male, 2 - female, 0 - unknown)

Example:1
importance_idnumber

Client priority level (0 - none, 1 - bronze, 2 - silver, 3 - gold)

Example:1
discountnumber

Customer Discount

Example:15
cardstring

Client card number

Example:555888666
national_idstring

Client national ID: CPF for Brazil, IIN for Kazakhstan. For a location in Kazakhstan the value must be a valid individual IIN — 12 digits with a correct check digit — otherwise the request is rejected with 422 Unprocessable Entity. Optional.

Example:"950315300129"
birth_datestring

Date of birth of the client in the format yyyy-mm-dd

Example:"952041600"
commentstring

A comment

Example:"throws show-off"
spentnumber

How much money spent in the location at the time of adding

Example:1000
balancenumber

Client balance

Example:-200
sms_checknumber

1 - Happy Birthday by SMS, 0 - do not congratulate

Example:0
sms_notnumber

1 - Exclude the client from SMS mailings, 0 - do not exclude

Example:0
online_booking_banboolean

true - block online booking for this client, false - allow it

client_agreementsobject

Consent flags. Applied only when client agreements are enabled for the Location.

categoriesobject

Array of customer tag IDs

Example:
[ 101, 102 ]
custom_fieldsobject

Array of additional client fields as "api-key": "value" pairs

Example:
{ "key-1": "value-1" }
curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/clients/{location_id}' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: */*' \
  -d '{
    "name": "James",
    "surname": "Smith",
    "patronymic": "James",
    "phone": 13155550179,
    "email": "j.smith@example.com",
    "sex_id": 1,
    "discount": 15,
    "importance_id": 1,
    "card": 555888666,
    "birth_date": "952041600",
    "comment": "throws show-off",
    "sms_check": 0,
    "sms_not": 0,
    "spent": 1000,
    "balance": -200,
    "categories": [
      101,
      102
    ],
    "custom_fields": {
      "key-1": "value-1"
    },
    "national_id": "950315300129"
  }'

Responses

Created

Bodyapplication/json
Response
{ "success": true, "data": { "id": 1121412, "name": "James", "surname": "Smith", "patronymic": "James", "phone": 13155550179, "email": "j.smith@example.com", "categories": [], "sex": "Male", "sex_id": 1, "discount": 15, "importance_id": 1, "importance": "Bronze", "card": 555888666, "birth_date": "952041600", "comment": "throws show-off", "sms_check": 0, "sms_not": 0, "spent": 1000, "balance": -1200, "visits": 0, "last_change_date": "2026-05-01T12:00:00-0500", "custom_fields": { … }, "national_id": "950315300129" }, "meta": [] }