AlmondTill/G3N API

segmentMembers

query · in the family Reading your records

What it does

One segment’s member list, in shopper-id order.

One segment's members, consumerId-ordered, born-paginated (limit defaults 50, clamps 1..100; walk until nextToken is null). The segment must exist in your org group. Requires authentication.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Read-only.

Arguments

NameTypeRequiredNotes
segmentIdID ID!yes
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

SegmentMemberPage SegmentMemberPage! — One page of a segment's members (consumerId order; walk until nextToken is null).

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.

Example request

graphql
query ExampleSegmentMembers($segmentId: ID!, $limit: Int) {
  segmentMembers(segmentId: $segmentId, limit: $limit) {
    items {
      id
      consumerId
      createdAt
    }
    nextToken
  }
}

Variables:

json
{
  "segmentId": "01900000-0000-7000-8000-50ab2f860000",
  "limit": 1
}

Example response

json
{
  "data": {
    "segmentMembers": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "consumerId": "01900000-0000-7000-8000-3cbb3ce90000",
          "createdAt": "2027-01-31T00:00:00.000Z"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer