API reference
Customers
Sync customer profiles and handle GDPR deletion.
Create or update a customer
POST /api/v1/stores/{store_id}/customersUpserts a customer. The natural key is external_id; if external_id is
omitted, phone is used as the key instead.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
external_id | string(255) | optional | Your customer id. Falls back to phone. |
phone | string | required | Matched to a WhatsApp contact. |
first_name | string(255) | optional | |
last_name | string(255) | optional | |
email | email(255) | optional | |
locale | string(10) | optional | e.g. fr. |
tags | string[] | optional | |
lifetime_value | integer ≥ 0 | optional | |
orders_count | integer ≥ 0 | optional |
Request
curl -X POST https://api.getkanal.com/api/v1/stores/123/customers \
-H "Authorization: Bearer 8fK2pX9mWq4Ld7Vb3Nc6Ts1Z" \
-H "Content-Type: application/json" \
-d '{
"external_id": "CUST-42",
"phone": "+33612345678",
"first_name": "Marie",
"email": "[email protected]",
"tags": ["vip"],
"lifetime_value": 1299,
"orders_count": 7
}'Response 201 Created / 200 OK
{
"external_id": "CUST-42",
"store_id": 123,
"first_name": "Marie",
"last_name": null,
"email": "[email protected]",
"locale": null,
"tags": ["vip"],
"lifetime_value": 1299,
"orders_count": 7
}Delete a customer (GDPR)
DELETE /api/v1/stores/{store_id}/customers/{external_id}Soft-deletes the customer record for this store. Use this to honor a GDPR erasure request originating from your shop.
curl -X DELETE https://api.getkanal.com/api/v1/stores/123/customers/CUST-42 \
-H "Authorization: Bearer 8fK2pX9mWq4Ld7Vb3Nc6Ts1Z"Response 204 No Content
No body. The call is idempotent — deleting an already-deleted (or unknown)
customer still returns 204.