Skip to content

Conventions

https://api.sabiwave.com/api/v1/public

HTTPS only. Request bodies are JSON (Content-Type: application/json), and so is every answer. The same endpoints are described in OpenAPI 3 at /api/v1/public/docs.json, if your tools read it.

A successful answer has success: true, the result under data, and sometimes a message for people:

{ "success": true, "data": { … } }

A refusal has success: false, a message you can show, and an error whose code is stable, so your code can branch on it. requestId identifies the request: quote it if you ask us about one.

404 Not Found
{
"success": false,
"message": "We could not find that product.",
"error": {
"name": "NotFoundError",
"code": "PRODUCT_NOT_FOUND",
"statusCode": 404
},
"requestId": "18da2bed-284c-423b-8d4d-eb7de737c1cd"
}

Every code is listed in Errors.

  • Ids are strings in UUID form, such as 01a2160c-6b00-7627-af42-d534badeaea4. Store them as text and send them back as you got them.
  • Order numbers, such as PDSWT-20261129-0001, are references for people: show them to shoppers. Use the order’s id to call the API.
  • Money is a number in your business’s currency, in major units: 20000 is ₦20,000.00. The currency is in GET /ping (business.currency), and amounts carry its decimals (two for the naira). Webhook payloads differ: most of their amounts are strings in minor units, so "totalMinor": "7450000" is ₦74,500.00. Each event says which.
  • Quantities are numbers above zero, with up to three decimal places.
  • Dates and times are ISO 8601 in UTC, such as 2026-11-29T02:56:08.309Z.

Lists come a page at a time, with nextCursor beside the page. Pass it back as cursor for the next page; null means there’s nothing more. limit is 1 to 100, 20 if you leave it out.

GET /catalog/products?limit=50
GET /catalog/products?limit=50&cursor={nextCursor from the first page}

Treat a cursor as an opaque string, good only for the list it came from: it carries nothing you can read or count. Each endpoint says which way its list runs: products oldest first, orders newest first. A cursor the API didn’t give out is refused, rather than read as the first page, so a loop over the pages can’t start again unnoticed:

422 Unprocessable Content
{
"success": false,
"message": "cursor is not one this list gave out",
"error": {
"name": "ValidationError",
"code": "VALIDATION_ERROR",
"statusCode": 422,
"details": [
{
"field": "cursor",
"message": "cursor is not one this list gave out",
"in": "query"
}
]
},
"requestId": "0dc2780e-a422-465f-8998-daf8751b6485"
}

POST /orders needs an Idempotency-Key header: 8 to 100 letters, digits, dots, colons, dashes or underscores. A new UUID for each order is ideal. Keep the key with your order, and send the same key if you retry.

  • The same key with the same request, within 24 hours, gets the first answer back, marked Idempotency-Replayed: true, and nothing runs again.
  • The same key with a different request is refused with 409 IDEMPOTENCY_KEY_REUSED.
  • While the first request is still running, a retry is refused with 409 IDEMPOTENCY_KEY_IN_PROGRESS: wait a moment and retry.
  • A server error (5xx) isn’t kept, so retrying it runs the request for real.

Keys belong to your business, so two of its API keys can’t use the same idempotency key for different orders.

200 OK · headers
HTTP/1.1 200 OK
Idempotency-Replayed: true
200 OK
{
"data": {
"order": {
"tax": 0,
"test": true,
"items": [
{
"name": "Weekend Gift Hamper",
"variant": null,
"quantity": 2,
"productId": "01a2160c-6b00-7627-af42-d534badeaea4",
"unitPrice": 20000
}
],
"total": 38500,
"status": "pending",
"discount": 4000,
"subtotal": 40000,
"amountPaid": 0,
"promotions": [
{
"kind": "code",
"name": "WEEKEND10",
"amount": 4000
}
],
"deliveryFee": 2500
}
},
"message": "Test key: the order was priced and checked, and nothing was made.",
"success": true
}
409 Conflict
{
"success": false,
"message": "This Idempotency-Key was already used for a different request.",
"error": {
"name": "ConflictError",
"code": "IDEMPOTENCY_KEY_REUSED",
"statusCode": 409
},
"requestId": "6d11cc70-3399-4d2d-810d-03779c8f7d98"
}

Without the header, POST /orders is refused with 400 IDEMPOTENCY_KEY_REQUIRED.