Search customer groups

Get information about all customer groups in an Ecwid store.

Request and response example

Request:

curl --location 'https://app.ecwid.com/api/v3/1003/customer_groups' \
--header 'Authorization: Bearer secret_ab***cd'

Response:

{
    "total": 2,
    "count": 2,
    "offset": 0,
    "limit": 100,
    "items": [
        {
            "id": 0,
            "name": "General"
        },
        {
            "id": 9367001,
            "name": "VIP"
        }
    ]
}

Access scopes

Requires the following access scope: read_customers

Path params

ParamTypeDescription
storeIdnumberEcwid store ID.

Query params

All query params are optional.

ParamTypeDescription
customerGroupIdnumberID of customer group. Supports multiple values, for example: 13456, 35678, 57890
keywordstringSearch term for the customer group name.
limitnumberMaximum number of returned items. Default value: 100. Maximum allowed value: 1000.
offsetnumberSet offset from the beginning of the returned items list by a margin of 100 (for paging).
responseFieldsstringLimit JSON response by specific fields. If specified, all missing fields will be removed from the response body.
Example: ?responseFields=total,items(id)

Example of using responseFields param:

curl --location 'https://app.ecwid.com/api/v3/1003/customer_groups?responseFields=total,items(id)' \
--header 'Authorization: Bearer secret_ab***cd'
{
    "total": 2,
    "items": [
        {
            "id": 0
        },
        {
            "id": 9367001
        }
    ]
}

Headers

The Authorization header with a secret access token is required.

HeaderFormatDescription
AuthorizationBearer secret_ab***cdAccess token of the application.

Response

A JSON object with the following fields:

FieldTypeDescription
totalnumberThe total number of created customer groups (may differ from the number of returned items)
countnumberThe number of returned items (excluding the default customer group)
offsetnumberOffset from the beginning of the returned items list (for paging)
limitnumberMaximum number of returned items. Maximum allowed value: 1000. Default value: 100
itemsArray itemsDetailed list of found customer groups

items

FieldTypeDescription
idnumberUnique internal customer group ID.
namestringCustomer group name.
Language
Click Try It! to start a request and see the response here!