Fetching segments
Customer segmentation organizes customers into specific groups based on shared characteristics or similar behavior that matter for your use cases. These groups represent different target audiences for your business, making it easier to deliver more relevant content and experiences to your web app visitors.
The Segment object
{
"id": "df7c1544-bad0-4c9d-928f-0c9f684c9ceb",
"created_on": "2023-01-23T14:34:59+00:00",
"changed_on": "2023-01-23T14:34:59+00:00",
"synced_on": "2023-06-13T00:49:05+00:00",
"label": "Segment",
"body": "Marketing campaign YYY",
"reference_id": "utm-source-google-ads",
"query": "{\"viewed\":[{\"param\":\"Body\",\"publication_tags_in\":[\"google-ads\"]}]}",
"count": 54609
}
FIELD | DESCRIPTION |
---|---|
id | Unique identifier for each item. |
created_on | UTC time at which the segment was created. |
changed_on | UTC time at which the segment was last updated. |
synced_on | UTC time at which the segment was last fully sycned. |
label | Identifier for the object. |
body | Name of the segment. |
reference_id | Custom segment API ID. |
query | JSON of the segment conditions. |
count | Total number of customers in this segment on the last sync. |
Fetching all segments
GET: /personalization/managing-segments
The pagination of the segments endpoint is identical to the content items endpoints.
Query by ID
Since IDs are unique in Prepr, you can find the segment you want using the id argument. Here is an example that demonstrates how to query a segment with the ID "535c1e-...":
GET: /personalization/managing-segments/535c1e-4d52-4794-9136-71e28f2ce4c1
Was this article helpful?
We’d love to learn from your feedback