Create, update & destroy customers

The Customer object

{
    "first_name": "Jhon",
    "last_name": "Doe",
    "date_of_birth": "2000-12-01",
    "gender": "male",
    "source" : "ios app",
    "custom" : {
        "paid" : true
    },
    "emails": {
        "items": [
            {
                "email": "jhon.doe@gmail.com"
            }
        ]
    },
    "tags": {
        "items": [
            {
                "body": "Amsterdam"
            }
        ]
    }
}
argumenttyperequireddescription
idString
first_nameStringfalseDefines the first name of the customer.
last_nameStringfalseDefines the last name of the customer.
genderStringfalseDefines the gender of the customer. Options: male, female, other.
date_of_birthStringfalseDefines the date of birth of the customer. Format: Y-m-d.
sourceStringfalseMostly used to define imports etc.
emailsObjectfalseDefines email addresses of the customer.
custom ObjectfalseDefines the custom properties of the customer.
reference_id StringfalseDefines the reference_id of the customer.
tags ObjectfalseDefines tags of the customer.

Create

To create a customer.

POST: https://customers.prepr.io/customers

Scopes: customers customers_publish

Update

To update an existing customer.

PUT: https://customers.prepr.io/customers/{id}

Scopes: customers customers_publish

Anonymize

The anonymize function removes customer data but keeps events untouched.

PUT: https://customers.prepr.io/customers/{id}/anonymize

Scopes: customers customers_publish

Destroy

To delete a customer.

DELETE: https://customers.prepr.io/customers/{id}

Scopes: customers customers_delete