Skip to content

Catalogue

The catalogue holds only products that are active and have Show on your website turned on in Sabiwave. A product you hide disappears from these answers at once.

GET/catalog/products

Scope catalog:readSecret or publishable key

Products on your website, oldest first, a page at a time.

Query Meaning
limit 1 to 100. Default 20.
cursor nextCursor from the previous page.
categoryId Only products in this category.
search Only products whose name contains this, in any case. Up to 100 characters.
minPrice Only products priced at least this much, in major units.
maxPrice Only products priced at most this much, in major units.
Terminal window
curl "https://api.sabiwave.com/api/v1/public/catalog/products?limit=20" \
-H "Authorization: Bearer $SABIWAVE_SECRET_KEY"
200 OK
{
"success": true,
"data": {
"products": [
{
"id": "01a2160c-6b00-7627-af42-d534badeaea4",
"name": "Weekend Gift Hamper",
"slug": "weekend-gift-hamper",
"description": "A weekend of treats in a woven basket: biscuits, chocolate, juice and a card.",
"price": 20000,
"category": {
"id": "01a22538-d1f7-765d-8fbb-efd7afcc9459",
"name": "Hampers"
},
"images": [],
"inStock": true,
"stockLevel": "low_stock",
"variants": [],
"seo": {
"title": null,
"description": null
}
}
],
"nextCursor": null
}
}

Filters combine:

Terminal window
curl "https://api.sabiwave.com/api/v1/public/catalog/products?search=weekend&maxPrice=30000&limit=10" \
-H "Authorization: Bearer $SABIWAVE_SECRET_KEY"
Field Meaning
id The product’s id: send it as productId in orders and promo checks.
name Its name.
slug A web-friendly name, unique in your business: use it in your page addresses.
description Its website description, written in the product’s Website description in Sabiwave, or null until one is. The product’s other description is for your team and never shown here.
price Its price, in major units of your currency.
category { id, name }, or null.
images Up to 8 pictures, in your order: each { url, thumbnailUrl }.
inStock false when there’s none left in the store your website sells from.
stockLevel in_stock, low_stock or out_of_stock.
variants Each { id, name, options, price, inStock, stockLevel }, where options is what makes it that variant, such as { "Colour": "Red", "Size": "L" }. Send the variant’s id as variantId in orders.
seo { title, description } for your page’s title and meta description, each possibly null.

Stock is the stock of the store your website sells from, your first open store, which is where a website order takes it: what shows as in stock is what an order can have. stockLevel is out_of_stock when none is left there, and low_stock when what’s left is at or below the product’s reorder point in that store, or 5 where none is set, as your dashboard counts it. A product with variants adds its variants up; a combo counts the sets its contents make; a service is never out. The exact count isn’t shown: it’s competitive information. Your server can read it with GET /inventory.

GET/catalog/products/{idOrSlug}

Scope catalog:readSecret or publishable key

One product, by its id or its slug, with the same fields as in the list. A product that isn’t on your website answers 404 PRODUCT_NOT_FOUND, as if it didn’t exist.

Terminal window
curl "https://api.sabiwave.com/api/v1/public/catalog/products/weekend-gift-hamper" \
-H "X-Sabiwave-Public-Key: $SABIWAVE_PUBLISHABLE_KEY" \
-H "Origin: https://shop.example.com"
200 OK
{
"success": true,
"data": {
"product": {
"id": "01a2160c-6b00-7627-af42-d534badeaea4",
"name": "Weekend Gift Hamper",
"slug": "weekend-gift-hamper",
"description": "A weekend of treats in a woven basket: biscuits, chocolate, juice and a card.",
"price": 20000,
"category": {
"id": "01a22538-d1f7-765d-8fbb-efd7afcc9459",
"name": "Hampers"
},
"images": [],
"inStock": true,
"stockLevel": "low_stock",
"variants": [],
"seo": {
"title": null,
"description": null
}
}
}
}
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"
}

GET/catalog/categories

Scope catalog:readSecret or publishable key

Active categories with at least one product on your website, in your order. Not paginated.

Terminal window
curl "https://api.sabiwave.com/api/v1/public/catalog/categories" \
-H "Authorization: Bearer $SABIWAVE_SECRET_KEY"
200 OK
{
"success": true,
"data": {
"categories": [
{
"id": "01a22538-d1f7-765d-8fbb-efd7afcc9459",
"name": "Hampers",
"description": "Gift hampers for every occasion.",
"imageUrl": null
}
]
}
}
Field Meaning
id Use it as categoryId when listing products.
name Its name.
description Its description, or null.
imageUrl Its picture, or null.