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 UserResource 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 — UserResource.
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.
UserResource 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 |
lastChanged | ISO datetime | Last modification timestamp |
customerTags | array of strings | Client-types assigned |