Skip to content

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.

POST/customers

Scope customers:writeSecret key only

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:

Terminal window
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"
}'
201 Created
{
"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.

Terminal window
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"
}'
200 OK
{
"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:

Terminal window
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"
}'
200 OK
{
"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/customers/{id}

Scope customers:readSecret key only

Terminal window
curl "https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd" \
-H "Authorization: Bearer $SABIWAVE_SECRET_KEY"
200 OK
{
"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.

GET/customers/{id}/orders

Scope customers:readSecret key only

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}.

Terminal window
curl "https://api.sabiwave.com/api/v1/public/customers/01a22953-aada-745d-a986-131fbe5367bd/orders?limit=5" \
-H "Authorization: Bearer $SABIWAVE_SECRET_KEY"
200 OK
{
"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.