List segments
curl --request GET \
--url https://{cluster}.voucherify.io/v1/segments \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "seg_5ix74s3gM3N7",
"name": "Customers with placed order",
"created_at": "2023-08-03T10:37:49.285Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.payment_placed.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_fi47Ds3gM3N7",
"name": "Newsletter subscribers",
"created_at": "2023-08-03T10:37:49.264Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.newsletter_subscribed.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_f0r4hs3gM3N7",
"name": "Reviewers",
"created_at": "2023-08-03T10:37:49.244Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.review_left.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_t4ir0Ds3gM3N7",
"name": "Sign up customers",
"created_at": "2023-08-03T10:37:49.225Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.sign_up.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
}
],
"total": 99
}List segments
Retrieves a list of segments.
The list doesn’t include the customers that belong to respective segments. To return a list of customers who belong to a segment, use GET List customers endpoint with the segment_id query parameter.
To return a list of different results, use the filters[created_at][conditions][$before] and filters[created_at][conditions][$after] query parameters as pagination.
GET
/
v1
/
segments
List segments
curl --request GET \
--url https://{cluster}.voucherify.io/v1/segments \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "seg_5ix74s3gM3N7",
"name": "Customers with placed order",
"created_at": "2023-08-03T10:37:49.285Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.payment_placed.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_fi47Ds3gM3N7",
"name": "Newsletter subscribers",
"created_at": "2023-08-03T10:37:49.264Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.newsletter_subscribed.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_f0r4hs3gM3N7",
"name": "Reviewers",
"created_at": "2023-08-03T10:37:49.244Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.review_left.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
},
{
"id": "seg_t4ir0Ds3gM3N7",
"name": "Sign up customers",
"created_at": "2023-08-03T10:37:49.225Z",
"updated_at": null,
"type": "auto-update",
"filter": {
"junction": "and",
"events.sign_up.count": {
"conditions": {
"$more_than": [
"0"
]
}
}
},
"object": "segment"
}
],
"total": 99
}Authorizations
X-App-Id & X-App-TokenX-Voucherify-OAuth
Scopes
Query Parameters
Response
200 - application/json
Returns a data array with segment objects.
Response body schema for GET v1/segments.

