Fetching a customer profile
After a customer signs in, you can query the customer profile using the following endpoint.
GET: https://customers.prepr.io/customers/me
Customer object
To expand the customer object when querying a customer profile, add the following field names to the fields parameter.
Fields
field name | type | description |
---|---|---|
id | String | - |
first_name | String | Lists the first name of the customer. |
last_name | String | Lists the last name of the customer. |
gender | String | Lists the gender of the customer. Options: male , female , other . |
date_of_birth | String | Lists the date of birth of the customer. Format: Y-m-d . |
source | String | Custom parameter to add a register source. |
emails | Array | Lists email addresses of the customer. |
custom | Array | Lists the custom properties of the customer. |
reference_id | String | Lists the reference_id of the customer. |
tags | Array | Lists tags of the customer. |
terms | Array | Lists the accepted terms by the customer. |
segments | Array | Lists the segment the customer is in. |
GET: https://customers.prepr.io/customers/me?fields=custom,emails,tags,terms
{
"id" : "234h-432847-x23498-763x4-324x234",
"first_name": "Jhon",
"last_name": "Doe",
"date_of_birth": "2000-12-01",
"company": "Prepr.io",
"job_title": "Developer",
"gender": "male",
"source" : "ios app",
"custom" : {
"paid" : true
},
"emails": {
"items": [
{
"email": "jhon.doe@gmail.com"
}
]
},
"tags": {
"items": [
{
"body": "Amsterdam"
}
]
},
"terms": {
"items": [
{
"id": "789asd-sad7asd8-asd8as7d8-2331"
}
]
}
}
Was this article helpful?
We’d love to learn from your feedback