Get Segment
curl --request GET \
--url https://{cluster}.voucherify.io/v1/segments/{segmentId} \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI2",
"name": "Tiers 2 - Senior",
"created_at": "2022-06-09T13:21:26.656Z",
"type": "auto-update",
"filter": {
"junction": "and",
"loyalty_points.campaigns.Tiers 2.points": {
"conditions": {
"$more_than_equal": [
41
]
}
}
},
"initial_sync_status": "DONE",
"object": "segment"
}{
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find segment with id seg_Mv5w1b2FIEbiCCO5ioT8TfI",
"request_id": "v-0b4d7a37a105797650",
"resource_id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI",
"resource_type": "segment"
}Get Segment
Retrieves the segment with a given segment ID.
This method doesn’t return the customers that belong to the segment. To return a list of customers who belong to a segment, use GET List customers endpoint with the segment_id query parameter.
GET
/
v1
/
segments
/
{segmentId}
Get Segment
curl --request GET \
--url https://{cluster}.voucherify.io/v1/segments/{segmentId} \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI2",
"name": "Tiers 2 - Senior",
"created_at": "2022-06-09T13:21:26.656Z",
"type": "auto-update",
"filter": {
"junction": "and",
"loyalty_points.campaigns.Tiers 2.points": {
"conditions": {
"$more_than_equal": [
41
]
}
}
},
"initial_sync_status": "DONE",
"object": "segment"
}{
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find segment with id seg_Mv5w1b2FIEbiCCO5ioT8TfI",
"request_id": "v-0b4d7a37a105797650",
"resource_id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI",
"resource_type": "segment"
}Authorizations
X-App-Id & X-App-TokenX-Voucherify-OAuth
Scopes
Path Parameters
Response
Returns segment object.
Response body schema for GET v1/segments/{segmentId}.
Defines whether the segment is:
- Active (
auto-update): customers enter and leave the segment based on the defined filters and thecustomer.segment.enteredandcustomer.segment.leftevents are triggered, - Passive (
passive): customers enter and leave the segment based on the defined filters, but thecustomer.segment.enteredandcustomer.segment.leftevents are not triggered, - Static (
static): manually selected customers.
Available options:
auto-update, passive, static 
