get https://app.ecwid.com/api/v3//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
Param | Type | Description |
---|---|---|
storeId | number | Ecwid store ID. |
Query params
All query params are optional.
Param | Type | Description |
---|---|---|
customerGroupId | number | ID of customer group. Supports multiple values, for example: 13456, 35678, 57890 |
keyword | string | Search term for the customer group name. |
limit | number | Maximum number of returned items. Default value: 100 . Maximum allowed value: 1000 . |
offset | number | Set offset from the beginning of the returned items list by a margin of 100 (for paging). |
responseFields | string | Limit 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.
Header | Format | Description |
---|---|---|
Authorization | Bearer secret_ab***cd | Access token of the application. |
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
total | number | The total number of created customer groups (may differ from the number of returned items) |
count | number | The number of returned items (excluding the default customer group) |
offset | number | Offset from the beginning of the returned items list (for paging) |
limit | number | Maximum number of returned items. Maximum allowed value: 1000 . Default value: 100 |
items | Array items | Detailed list of found customer groups |
items
Field | Type | Description |
---|---|---|
id | number | Unique internal customer group ID. |
name | string | Customer group name. |