KanalKanal API
API reference

Customers

Sync customer profiles and handle GDPR deletion.

Create or update a customer

POST /api/v1/stores/{store_id}/customers

Upserts a customer. The natural key is external_id; if external_id is omitted, phone is used as the key instead.

Body

FieldTypeRequiredNotes
external_idstring(255)optionalYour customer id. Falls back to phone.
phonestringrequiredMatched to a WhatsApp contact.
first_namestring(255)optional
last_namestring(255)optional
emailemail(255)optional
localestring(10)optionale.g. fr.
tagsstring[]optional
lifetime_valueinteger ≥ 0optional
orders_countinteger ≥ 0optional

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.

On this page