Search customer groups

GET https://app.ecwid.com/api/v3/{storeId}/customer_groups

Request and response example

Request:

GET /api/v3/1003/customer_groups HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com

Response:

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

Required access scopes

Your app must have the following access scopes to make this request: read_customers

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

Query params

All query params are optional.

Name
Type
Description

customerGroupId

number

Search specific customer groups by listing their IDs. Supports multiple values, for example: 13456, 35678, 57890

keyword

string

Search term for the customer group name.

offset

number

Maximum number of returned items. Default value: 100. Maximum allowed value: 1000.

limit

number

Limit to the number of returned items. Maximum and default value (if not specified) is 100.

responseFields

string

Specify the exact fields to receive in response JSON. If not specified, the response JSON will have all available fields for the entity. Example: ?responseFields=total,items(name)

Example of using responseFields param:

curl --location 'https://app.ecwid.com/api/v3/1003/customer_groups?responseFields=total,items(name)' \
--header 'Authorization: Bearer secret_ab***cd'

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Response JSON

A JSON object with the following fields:

Field
Type
Description

total

number

Total number of found items (might be more than the number of returned items).

count

number

Total number of items returned in the response.

offset

number

Offset from the beginning of the returned items list specified in the request.

limit

number

Maximum number of returned items specified in the request. Maximum and default value: 100.

items

array of objects items

Detailed information about returned customer groups.

items

Field
Type
Description

id

number

Unique internal ID of the customer group.

name

string

Customer group name visible to customers on the storefront.

externalReferenceId

string

External ID for syncing customer goups with other services.

Last updated

Was this helpful?