Skip to content

Creation of customer group

Request

Creates a new customer group with specified settings. The customer group name must be unique. Returns the full list of customer groups including the newly created one.

Note: To use wholesale features (registrationAllowed, wholesale, tableLayout, fullProfileRequired), the wholesale module must be active in the e-shop.

Security
shoptetAccessToken or shoptetPrivateApiToken
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobjectrequired
curl -i -X POST \
  https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/customers/groups \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "name": "Wholesale customers",
      "description": "Wholesale customers are the best customers",
      "defaultPricelistId": 1,
      "emailNotification": true,
      "authRequired": true,
      "maxDiscount": "0.5500",
      "defaultDueDays": 14,
      "registrationAllowed": true,
      "wholesale": true,
      "tableLayout": true,
      "fullProfileRequired": true,
      "defaultOrderStatusId": -2
    }
  }'

Responses

Created

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
Response
{ "data": { "customerGroups": [] }, "errors": [ {} ] }