Skip to content

List customer groups

GET
/customers/groups
curl --request GET \
--url 'https://api.oletapp.com/your-store/v1/customers/groups?limit=50&order=asc&include_deleted=false' \
--header 'Authorization: Bearer <token>'

Cursor-paginated: pass the previous response’s next_cursor back as cursor to fetch the next page. Soft-deleted groups are omitted unless include_deleted=true, which only pairs with the default ascending order.

  • 400 VALIDATION_FAILED: include_deleted=true combined with order=desc.

Requires scope: customers:read

limit
integer
default: 50 >= 1 <= 200
cursor

Opaque. Pass back the exact next_cursor value from a previous response; never construct one. A cursor that fails to decode is 400 VALIDATION_FAILED, in every order mode.

string
>= 1 characters

Opaque. Pass back the exact next_cursor value from a previous response; never construct one. A cursor that fails to decode is 400 VALIDATION_FAILED, in every order mode.

order
string
default: asc
Allowed values: asc desc
include_deleted
boolean

List customer groups

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string
version
required

Opaque delta-sync version. Increases with every change; use it to detect updates.

string
has_more
required
boolean
next_cursor
required

Opaque pagination cursor. Pass back as ?cursor= to fetch the next page.

string | null
Examplegenerated
{
"data": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"version": "example"
}
],
"has_more": true,
"next_cursor": "example"
}

An error response.

Media typeapplication/json
object
error
required
object
code
required

A machine-readable error code, e.g. VALIDATION_FAILED.

string
Allowed values: UNAUTHORIZED PLAN_REQUIRED INSUFFICIENT_SCOPE NOT_FOUND VALIDATION_FAILED CONFLICT STALE_VERSION RATE_LIMITED IDEMPOTENCY_KEY_REUSED IDEMPOTENCY_IN_PROGRESS IMAGE_FETCH_FAILED UNPROCESSABLE INTERNAL RETAILER_CANCELLED RETAILER_SUSPENDED RETAILER_NOT_FOUND TRIAL_DECISION_REQUIRED PLAN_USERS_EXCEEDED RETAILER_PAUSED PRODUCT_LIMIT_REACHED NOT_STOCK_TRACKED REASON_DIRECTION_MISMATCH REASON_NOT_ALLOWED INSUFFICIENT_STOCK OUTLET_DELETED
fields
Array<object>
object
field
required
string
message
required
string
message
required

A plain-English sentence describing what went wrong.

string
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}