Skip to content

Creation of customer

Request

Security
shoptetAccessToken or shoptetPrivateApiToken
Query
suppressMandatoryFieldsCheckboolean

suppress checking if new customer has filled all mandatory fields from eshop settings Settings -> Customers -> Mandatory fields. Suppressing this check can cause worse customer experience in order process for customers without all mandatory fields! However this can be useful for migration customers from older system without all necessary fields.

Default:false
Example:suppressMandatoryFieldsCheck=false
sendRegistrationEmailboolean

If set to true, registration emails are sent to the customer. The type of email depends on the customerGroup settings. If the group requires verification, the customer receives an email indicating that the registration is pending administrator approval (typically for the wholesale group). Otherwise, the customer receives a standard registration confirmation email.

If the customer group has email notifications enabled for the administrator, a copy of the email is also sent to them (again, typically for the wholesale group).

Default:false
Example:sendRegistrationEmail=false
languagestring

Specifies the language in which the email should be sent to the customer, provided that sendRegistrationEmail = true and the "Foreign Languages" module is enabled on the current e-shop.

Example:language=cs
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobject, non-emptyrequired
curl -i -X POST \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/customers?suppressMandatoryFieldsCheck=false&sendRegistrationEmail=false&language=cs' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "remark": "remark",
      "priceRatio": "0.7800",
      "birthDate": "1974-03-14",
      "disabledOrders": true,
      "customerGroupCode": "retail",
      "pricelistId": 1,
      "billingAddress": {
        "company": "Lard shop",
        "fullName": "John Lard",
        "street": "Lard street",
        "houseNumber": "123",
        "city": "Lard city",
        "district": "Prague-East",
        "additional": "4. floor",
        "zip": "120 00",
        "countryCode": "CZ",
        "regionName": "Capital city",
        "companyId": "12345678",
        "vatId": "CZ123456",
        "taxId": "CZ123456"
      },
      "account": {
        "fullName": "Jan Novak",
        "email": "jan.novak@gmail.com",
        "phone": "420777888999",
        "authorized": true,
        "emailVerified": true
      }
    }
  }'

Responses

Created

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "customer": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }