Fetching customers

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 nametyperequireddescription
idString--
first_nameStringfalseLists the first name of the customer.
last_nameStringfalseLists the last name of the customer.
genderStringfalseLists the gender of the customer. Options: male, female, other.
date_of_birthStringfalseLists the date of birth of the customer. Format: Y-m-d.
sourceStringfalseCustom parameter to add a register source.
emailsArrayfalseLists email addresses of the customer.
custom ArrayfalseLists the custom properties of the customer.
reference_id StringfalseLists the reference_id of the customer.
tags ArrayfalseLists tags of the customer.
segments ArrayfalseLists 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