Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
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
}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.
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
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
1 <= x <= 100Apply this filter to order the segments according the date and time when they were created. By default, lists the segments from the newest to the oldest. Use created_at to list from the oldest to the newest.
created_at, -created_at Filters for listing templates.
Show child attributes
Contains the list of segments in the sequence defined by the order parameter.
Returns a data array with segment objects.
Response body schema for GET v1/segments.
The type of the object represented by JSON. This object stores information about segments.
list Identifies the name of the attribute that contains the array of segments.
data Total number of segments returned for given filters and query parameters with the exception of limit.
An array of segment objects. Returns an empty array if there are no results matching query parameters.
Show child attributes
Was this page helpful?