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"
}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.
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"
}Authorizations
Path Parameters
A unique customer segment ID.
"seg_DNAOhUtJffvX0f57ajLMFBYR"
Response
Returns segment object.
Response body schema for GET v1/segments/{segmentId}.
Unique segment ID.
"seg_1wc52c5z6r1kQ81brO8j9Hk2"
Segment name.
Timestamp representing the date and time when the segment was created. The value is shown in the ISO 8601 format.
"2022-05-12T13:01:56.896Z"
Timestamp in ISO 8601 format indicating when the segment was updated.
"2022-10-03T12:24:58.008Z"
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.
auto-update, passive, static Defines a set of criteria for an auto-update or passive segment type.
The type of the object represented by JSON. This object stores information about the customer segment.
segment Was this page helpful?

