Skip to content

Update of customer group

Request

Updates an existing customer group with specified settings. Returns the full list of customer groups including the updated one.

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

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
idintegerrequired

Customer group ID

Example:1
Query
languagestring

Specifies the language of updated customer group. If not provided, the default language of the e-shop will be used. This parameter is relevant only if 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 PATCH \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/customers/groups/1?language=cs' \
  -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

OK

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