• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
List customer segments

GET /v2/customers/segments

Retrieves the list of customer segments of a business.


Permissions
CUSTOMERS_READ
Try in API Explorer
Name Description
cursor
string

A pagination cursor returned by previous calls to ListCustomerSegments. This cursor is used to retrieve the next set of query results.

For more information, see Pagination.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

segments
CustomerSegment [ ]

The list of customer segments belonging to the associated Square account.

cursor
string

A pagination cursor to be used in subsequent calls to ListCustomerSegments to retrieve the next set of query results. The cursor is only present if the request succeeded and additional results are available.

For more information, see Pagination.

Examples

You are viewing an old version of the API
GET /v2/customers/segments
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/customers/segments \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "segments": [
    {
      "id": "GMNXRZVEXNQDF.CHURN_RISK",
      "name": "Lapsed",
      "created_at": "2020-01-09T19:33:24.469Z",
      "updated_at": "2020-04-13T21:47:04Z"
    },
    {
      "id": "GMNXRZVEXNQDF.LOYAL",
      "name": "Regulars",
      "created_at": "2020-01-09T19:33:24.486Z",
      "updated_at": "2020-04-13T21:47:04Z"
    },
    {
      "id": "GMNXRZVEXNQDF.REACHABLE",
      "name": "Reachable",
      "created_at": "2020-01-09T19:33:21.813Z",
      "updated_at": "2020-04-13T21:47:04Z"
    },
    {
      "id": "gv2:KF92J19VXN5FK30GX2E8HSGQ20",
      "name": "Instant Profile",
      "created_at": "2020-01-09T19:33:25Z",
      "updated_at": "2020-04-13T23:01:03Z"
    }
  ]
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?