Skip to content

Bulk adding clients

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

phonestringrequired

Customer phone

surnamestring

Client surname

middle_namestring

Client middle name

emailstring

Client Email

gender_idnumber

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

importance_idnumber

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

discountnumber

Customer Discount

cardstring

Client card number

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 row is skipped and reported in errors. Optional.

birth_datestring

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

commentstring

A comment

spentnumber

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

balancenumber

Client balance

sms_checknumber

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

sms_notnumber

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

categoriesobject

Array of customer tag IDs

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/clients/{location_id}/bulk' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: */*' \
  -d '[
    {
      "name": "James",
      "surname": "Smith",
      "middle_name": "James",
      "phone": 13155550181,
      "email": "j.smith@example.com",
      "gender_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
      ],
      "national_id": "950315300129"
    },
    {
      "name": "James",
      "surname": "Smith",
      "middle_name": "James",
      "phone": 13155550181
    },
    {
      "phone": 13155550182
    },
    {
      "name": "James",
      "surname": "Smith",
      "middle_name": "James",
      "phone": 13155550183
    },
    {
      "name": "Theodore",
      "surname": "Hicks",
      "middle_name": "Richardson"
    }
  ]'

Responses

OK

Bodyapplication/json
Response
{ "success": true, "data": { "created": [ … ], "errors": [ … ] }, "meta": [] }