Retrieve a list of customer groups. The customer groups can be filtered by fields such as name or `id. The customer groups can also be sorted or paginated.
Request
Query Params
q
string
optional
term to search customer groups by name.
offset
integer
optional
The number of customer groups to skip when retrieving the customer groups.
order
string
optional
A field to sort order the retrieved customer groups by.
discount_condition_id
string
optional
Filter by discount condition ID.
id
string
optional
Filter by the customer group ID
name
array[string]
optional
Filter by the customer group name
lt
array[string]
optional
filter by dates less than this date
Example:
["",""]
gt
array[string]
optional
filter by dates greater than this date
Example:
["",""]
lte
array[string]
optional
filter by dates less than or equal to this date
Example:
["",""]
gte
array[string]
optional
filter by dates greater than or equal to this date
Example:
["",""]
limit
integer
optional
The number of customer groups to return.
expand
string
optional
Comma-separated relations that should be expanded in the returned customer groups.
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request GET '/admin/customer-groups'
Responses
🟢200OK
application/json
Body
count
integer
required
The total number of items available
offset
integer
required
The number of customer groups skipped when retrieving the customer groups.
limit
integer
required
The number of items per page
customer_groups
array[object (Customer Group) {8}]
required
An array of customer group details.
id
string
required
The customer group's ID
Example:
cgrp_01G8ZH853Y6TFXWPG5EYE81X63
name
string
required
The name of the customer group
Example:
VIP
created_at
string<date-time>
required
The date with timezone at which the resource was created.
updated_at
string<date-time>
required
The date with timezone at which the resource was updated.
deleted_at
string<date-time>|null
required
The date with timezone at which the resource was deleted.
customers
array [object]
optional
The details of the customers that belong to the customer group.
price_lists
array [object]
optional
The price lists that are associated with the customer group.