younifyd
Menu

Get customer segments

Get customer segments

GET/shops/{shopKey}/countries/{countryCode}/customer-segments

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Get customer segments action (under CustomerSegments).
  3. Fill in the fields below, then reference the result from later steps as {{getCustomerSegments.response.data}}.

Request

Path parameters

shopKeystringrequired

The shop key.

countryCodestringrequired

The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

Query parameters

limitinteger

Maximum number of segments per page.

Default 50

cursorstring

Valid cursor used for pagination.

filters[name]string

Filter segments by name. Supports partial matching; use * as a wildcard (e.g. "VIP*"). If no wildcard is provided, the value is matched as a substring.

filters[active]boolean

Filter segments by active status. When omitted, segments of any status are returned.

Response

Returns 200 with an object. Read it in later steps with {{getCustomerSegments.response.data.<field>}}.

entitiesarray<object>
guidstring (uuid)

Unique identifier of the segment.

referenceKeystring

Business-facing identifier.

namestring

Display name of the segment.

criteriaDslstring

Criteria DSL defining the segment rules (e.g. `"TIER-A" IN groups AND LTV > 1000`).

rulesinteger

The number of conditions in the criteriaDsl.

activeboolean

Whether the segment is active.

createdDatestring (date-time)
updatedDatestring (date-time)
cursorobject
nextstring

The cursor pointing to the next page. If null there is no next page available.

json
{
  "entities": [
    {
      "guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "referenceKey": "string",
      "name": "string",
      "criteriaDsl": "string",
      "rules": 0,
      "active": false,
      "createdDate": "2025-01-01T00:00:00Z",
      "updatedDate": "2025-01-01T00:00:00Z"
    }
  ],
  "cursor": {
    "next": "MQ=="
  }
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.

Get customer segments — SCAYLE Admin — Documentation