Customer types
Not all holders are the same: a VIP, a trade customer, an employee, a regular customer. Customer types sort your holders into segments you define.
What they are for
- Show a status on the card: "Gold", "Pro", "Season ticket". The iOS header can show the type (
iosHeaderset toTYPE, see PATCH/store-cards). - Target a segment: send coupons and notifications to its customers (recipient list,
target: SPECIFICfor notifications). - Move customers up: Silver → Gold, you change their type, their card updates.
Endpoints
| Need | Endpoint |
|---|---|
| List types | GET/client-types |
Create a type (and make it the default with isDefault) | POST/client-types |
| Read, edit, delete a type | GET/client-types/{id}, PATCH/client-types/{id}, DELETE/client-types/{id} |
| Assign a type to a customer | clientType on POST/clients or PATCH/clients/{id} |
- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L 'https://api-v2.test.eldowallet.fr/client-types' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
-d '{
"name": "Gold",
"isDefault": false
}'
The default type
A wallet that uses types always has a default type. A customer created without a type gets it.
You cannot remove the only default type: the API returns DEFAULT_CLIENT_TYPE_REQUIRED. Make another type the default first.
Assignment error
An unknown or malformed type when creating a customer returns ERROR_CUSTOMER_TYPE_ASSIGNMENT. Get the ids with GET/client-types.
Go further
- Import a customer base
- Automotive use case: consumers and trade customers in one programme