List Customer's Segments
curl --request GET \
--url https://{cluster}.voucherify.io/v1/customers/{customerId}/segments \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "seg_DNAOhUtJffvX0f57ajLMFBYR",
"name": "area code not 123",
"object": "segment"
},
{
"id": "seg_IPIYx96l92Op0Sy5MOaImhgw",
"name": "not bob.smith@email.com",
"object": "segment"
},
{
"id": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
"name": "Birthday After Dec 31",
"object": "segment"
},
{
"id": "seg_ZEbbT4mq1ePpM9PzR02lcww2",
"name": "Start with S",
"object": "segment"
},
{
"id": "seg_WJv55MbzQwnr56ttJ2xUrSgt",
"name": "Loyalty Card",
"object": "segment"
}
],
"total": 5
}List Customer's Segments
Returns the list of segments IDs to which the customer belongs to.
If you pass a customerId which is not stored and recognized by Voucherify as an existing customer in the system, the response will generate a list of segments that the customer would potentialy qualify for if they were to become a customer tracked in the system.
GET
/
v1
/
customers
/
{customerId}
/
segments
List Customer's Segments
curl --request GET \
--url https://{cluster}.voucherify.io/v1/customers/{customerId}/segments \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "seg_DNAOhUtJffvX0f57ajLMFBYR",
"name": "area code not 123",
"object": "segment"
},
{
"id": "seg_IPIYx96l92Op0Sy5MOaImhgw",
"name": "not bob.smith@email.com",
"object": "segment"
},
{
"id": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
"name": "Birthday After Dec 31",
"object": "segment"
},
{
"id": "seg_ZEbbT4mq1ePpM9PzR02lcww2",
"name": "Start with S",
"object": "segment"
},
{
"id": "seg_WJv55MbzQwnr56ttJ2xUrSgt",
"name": "Loyalty Card",
"object": "segment"
}
],
"total": 5
}Authorizations
X-App-Id & X-App-TokenX-Voucherify-OAuth
Scopes
Path Parameters
Response
200 - application/json
The method returns segment(s) to which the given customer belongs to.
Response body schema for GET v1/customers/{customerId}/segments.

