---
title: "customerSegmentMembers"
description: "A list of members under a certain segment, such as customers"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/queries/customer-segment-members'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/queries/customer-segment-members.md'
---
# customerSegmentMembers

A list of members under a certain segment, such as customers

- **Required Scopes:** `read_customers`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`CustomerSegmentMemberConnection`

## Required Permissions

* `read_customers`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `last`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Returns the last n elements in the list. 

* `reverse`

  [Boolean](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether to reverse the order of the list. 
  
  ● true: reverse
  
  ● false: do not reverse
  
  Default value: false

* `segmentId`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  segmen id

* `sortKey`

  [CustomerSortKeys](https://developer.shopline.com/docs/admin-graph-ql-api/customers/enums/customer-sort-keys.md)

  Sort by specified key value

* `timezone`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Time zone for explaining relative date parameters . if the time zone is not provided , the time zone defaults to utc .

* `after`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Returns elements following the specified cursor. The `first` argument must also be specified when using this argument.

* `before`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Returns elements preceding the specified cursor. The `last` argument must also be specified when using this argument.

* `first`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Returns the first n elements in the list. 

## Returns

* `edges`

  [[CustomerSegmentMemberEdge!]](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-segment-member-edge.md)

  edges list

* `pageInfo`

  [PageInfo!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/page-info.md)

  Information to aid in pagination.

* `totalCount`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  Total number of customers segmented

## Code Example

```graphql
 {
	customerSegmentMembers(last, reverse, segmentId, sortKey, timezone, after, before, first ) 
		 {
			# CustomerSegmentMemberConnection fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

