Customers
Your website’s customers and your shop’s customers are one list: a customer is matched by phone,
then by email, the same way as at the POS. You don’t have to add customers before placing orders:
POST /orders finds or adds its customer itself. Use these when your website keeps accounts of its
own and wants Sabiwave’s id for each.
Find or add a customer
Section titled “Find or add a customer”POST/customers
| Field | Meaning |
|---|---|
name |
Required. Up to 120 characters. |
phone |
Their phone number. Send phone, email or both. |
email |
Their email address. |
address |
Up to 500 characters. Saved only if the customer has no address yet. |
A new customer answers 201 with created: true:
curl -X POST "https://api.sabiwave.com/api/v1/public/customers" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com", "address": "12 Admiralty Way, Lekki, Lagos"}'const res = await fetch('https://api.sabiwave.com/api/v1/public/customers', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com", "address": "12 Admiralty Way, Lekki, Lagos" }),});const result = await res.json();{ "success": true, "data": { "customer": { "id": "01a22953-aada-745d-a986-131fbe5367bd", "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com", "address": "12 Admiralty Way, Lekki, Lagos", "createdAt": "2026-11-29T22:01:18.810Z" }, "created": true }}Someone you already have answers 200 with created: false, and their record as it stands: a
different name in the request doesn’t rename them.
curl -X POST "https://api.sabiwave.com/api/v1/public/customers" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Kemi", "phone": "+2348030000002"}'const res = await fetch('https://api.sabiwave.com/api/v1/public/customers', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "Kemi", "phone": "+2348030000002" }),});const result = await res.json();{ "success": true, "data": { "customer": { "id": "01a22953-aada-745d-a986-131fbe5367bd", "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com", "address": "12 Admiralty Way, Lekki, Lagos", "createdAt": "2026-11-29T22:01:18.810Z" }, "created": false }}With a test key it’s a dry run: the same matcher answers 200 with
"test": true, and nothing is saved. A customer it would add has no id or createdAt yet, since
none was made:
curl -X POST "https://api.sabiwave.com/api/v1/public/customers" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Tunde Bakare", "phone": "+2348030000009", "email": "tunde@example.com"}'const res = await fetch('https://api.sabiwave.com/api/v1/public/customers', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "Tunde Bakare", "phone": "+2348030000009", "email": "tunde@example.com" }),});const result = await res.json();{ "success": true, "message": "Test key: the customer would be added, and nothing was saved.", "data": { "customer": { "id": null, "name": "Tunde Bakare", "phone": "+2348030000009", "email": "tunde@example.com", "address": null, "createdAt": null }, "created": true, "test": true }}Get a customer
Section titled “Get a customer”GET/customers/{id}
curl "https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY"const res = await fetch('https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd', { headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, },});const result = await res.json();{ "success": true, "data": { "customer": { "id": "01a22953-aada-745d-a986-131fbe5367bd", "name": "Kemi Okafor", "phone": "+2348030000002", "email": "kemi@example.com", "address": "12 Admiralty Way, Lekki, Lagos", "createdAt": "2026-11-29T22:01:18.810Z" } }}| Field | Meaning |
|---|---|
id |
The customer’s id. |
name |
Their name. |
phone |
Their main phone number, or null. |
email |
Their main email address, or null. |
address |
Their address, or null. |
createdAt |
When they were added, from any channel. |
An id that isn’t one of your customers answers 404 CUSTOMER_NOT_FOUND.
List a customer’s orders
Section titled “List a customer’s orders”GET/customers/{id}/orders
Their orders from every channel, your shop’s included, newest first, a page at a time (limit,
cursor). Each is a summary: read a website order in full with
GET /orders/{id}.
curl "https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd/orders?limit=5" \ -H "Authorization: Bearer $SABIWAVE_SECRET_KEY"const res = await fetch('https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd/orders?limit=5', { headers: { Authorization: `Bearer ${process.env.SABIWAVE_SECRET_KEY}`, },});const result = await res.json();{ "success": true, "data": { "orders": [ { "id": "01a22953-ae27-7590-abe0-609936b06d7c", "orderNumber": "PDSWT-20261129-0008", "status": "pending", "channel": "website", "total": 74500, "amountPaid": 0, "createdAt": "2026-11-29T22:01:19.684Z" } ], "nextCursor": null }}| Field | Meaning |
|---|---|
id |
The order’s id. |
orderNumber |
Its number, as your team sees it. |
status |
Where it stands: see order statuses. |
channel |
Where it was sold, such as website. |
total |
What it comes to, in major units. |
amountPaid |
What’s been paid on it. |
createdAt |
When it was placed. |