Fetching customers
Customers are all persons who have interacted with your content. Meaning all persons who have read, clicked, shared, bookmarked, or commented on content items. A customer profile is created for each person. You can manage these profiles in Prepr. With this, we enable you to segment and personalize content for your customers.
The Customer object
To expand the customer object when querying a customer add the field name below in the fields
parameter.
{
"id" : "234h-432847-x23498-763x4-324x234",
"first_name": "Jhon",
"last_name": "Doe",
"date_of_birth": "2000-12-01",
"company": "Prepr.io",
"gender": "male",
"source" : "ios app",
"custom" : {
"paid" : true
},
"emails": {
"items": [
{
"email": "jhon.doe@gmail.com"
}
]
},
"tags": {
"items": [
{
"body": "Amsterdam"
}
]
}
}
field name | type | required | description |
---|---|---|---|
id | String | - | - |
first_name | String | false | Lists the first name of the customer. |
last_name | String | false | Lists the last name of the customer. |
gender | String | false | Lists the gender of the customer. Options: male , female , other . |
date_of_birth | String | false | Lists the date of birth of the customer. Format: Y-m-d . |
source | String | false | Custom parameter to add a register source. |
emails | Array | false | Lists email addresses of the customer. |
custom | Array | false | Lists the custom properties of the customer. |
reference_id | String | false | Lists the reference_id of the customer. |
tags | Array | false | Lists tags of the customer. |
segments | Array | false | Lists the segment the customer is in. |
Fetching all customers
If you want to fetch a collection of customers.
GET: https://customers.prepr.io/customers
How to filter the customs is explained on the Filtering customers page.
Query by ID
Since IDs are unique in Prepr, you can find the customer you want using the id argument. Here is an example that demonstrates how to query an customer with the ID "535c1e-...":
GET: https://customers.prepr.io/customers/{{uuid}}?fields=custom,emails,tags,terms
Was this article helpful?
We’d love to learn from your feedback