Customers
Manage customer records - create, search, update, and tag with client-types.
| Method | Path | Purpose |
|---|---|---|
POST | /peppered/customer | Create a new customer |
POST | /peppered/customer/findByEmail | Search by email |
GET | /peppered/customer/{customerId} | Get a specific customer |
PUT | /peppered/customer/{customerId} | Update customer details |
GET | /peppered/customer/{customerId}/clienttypes | List a customer's tags |
POST | /peppered/customer/{customerId}/clienttypes | Set a customer's tags |
All paths start with /v1/:client_name/peppered/... - the full prefix is omitted in the table for brevity.
Create customer
POST /v1/:client_name/peppered/customer
Request body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | ✓ | Valid email, must be unique within the client |
customerFirstName | string | ✓ | First name (max 255) |
customerLastName | string | ✓ | Last name (max 255) |
customerSalutation | string | - | Single character (e.g. M, F) |
customerPreposition | string | - | Dutch tussenvoegsel (max 255) |
customerAddress | string | - | Address line (max 255) |
customerHouseNr | string | - | House number (max 20) |
customerZip | string | - | Postcode (max 10) |
customerCity | string | - | City (max 255) |
customerCountry | string | - | Country (max 255) |
customerPhone | string | - | Must be numeric |
customerCredit | string | - | Decimal with up to 2 decimals (e.g. 25.50) |
Response
201 Created - returns the created customer in User format.
422 Unprocessable Entity - validation errors (e.g. duplicate email).
Find customer by email
POST /v1/:client_name/peppered/customer/findByEmail
Request body
| Field | Type | Required |
|---|---|---|
email | string | ✓ |
Response
200 OK - the matching customer, or 404 if none.
Get customer
GET /v1/:client_name/peppered/customer/{customerId}
Returns a single customer.
Response
200 OK - User.
Update customer
PUT /v1/:client_name/peppered/customer/{customerId}
Same request body as Create customer, but all fields are optional (send only what you want to change).
Response
200 OK - the updated customer.
Get customer client-types
GET /v1/:client_name/peppered/customer/{customerId}/clienttypes
Returns the tags currently assigned to this customer.
Response
200 OK
["friend", "donor", "vip"]
Use the Export client types endpoint to retrieve the full list of available tags for this client.
Set customer client-types
POST /v1/:client_name/peppered/customer/{customerId}/clienttypes
Overwrites the customer's tags.
Request body
{
"clienttypes": ["friend", "donor"]
}
Sending an empty array removes all tags.
Response
200 OK - the updated tag list.
User fields
The response body for customer endpoints:
| Field | Type | Description |
|---|---|---|
customerId | integer | Unique customer ID |
customerExternalId | string | null | External reference (e.g. CRM ID) |
email | string | Email address |
customerSalutation | string | Salutation |
customerFirstName | string | First name |
customerLastName | string | Last name |
customerPreposition | string | Dutch tussenvoegsel |
customerAddress | string | Street + house number |
customerHouseNr | string | House number separately |
customerZip | string | Postcode |
customerCity | string | City |
customerCountry | string | Country |
customerPhone | string | Phone |
customerCredit | string (decimal) | Current credit balance |
customerCustom1..customerCustom7 | string | null | Custom fields, mapped from user_custom1..user_custom7. Configuratie per veld gebeurt in Dashboard → Instellingen → Webshop → Custom velden. |
customerPrefs | object | null | Opt-in preferences as a key-value object - see Opt-in preferences |
lastChanged | ISO datetime | Last modification timestamp |
customerTags | string | null | Client-types assigned, comma-separated (e.g. friend,donor); null when none |
Opt-in preferences (customerPrefs)
customerPrefs exposes the customer's opt-in preferences (the internal user_prefs field) as a flat key-value object. It is included in every customer response and in the customer export.
"customerPrefs": {
"user_prefs_optin": "1",
"user_prefs_mailinglist": "0",
"user_prefs_extra_optin": "0"
}
| Key | Meaning |
|---|---|
user_prefs_optin | Consent to be emailed by the organisation. When "0", template and ad-hoc mailings to this customer are skipped. |
user_prefs_mailinglist | Newsletter / mailing-list opt-in (the "mailinglist" preference in the Dashboard visitor record). |
user_prefs_extra_optin | The optional extra opt-in checkbox on the webshop order form (only shown when the organisation has enabled it). |
Notes:
- Values are normally the strings
"1"(yes) and"0"(no). Older records may still hold an integer or boolean for the same key, so compare loosely (== 1). - Keys are only present if they were ever stored for that customer - older records may lack
user_prefs_extra_optin. Treat a missing key as"0". customerPrefsisnullwhen the customer has no stored preferences.- Any additional preference keys added in the future appear in the same object; they are passed through as-is.
- The field is read-only via this API:
POST/PUT /peppered/customerdo not acceptcustomerPrefs.