Catalogue
Products, a product's page and the categories, as the token's market shows them.
| Operation | What it does |
|---|---|
GET /products | Products as the token's market lists them: category, tag, sort and limit (at most 48). |
GET /products/{handle} | One product's page: its variants with their prices, stock and quantity rules. |
GET /categories | The store's product categories and tags. |
GET /products
GET https://kaizenaflow.com/api/storefront/v1/{store}/products
Products as the token's market lists them: category, tag, sort and limit (at most 48).
Answers:
200, the answer.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
store | string | yes | The store, by its slug. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
category | string (uuid) | no | |
tag | string (uuid) | no | |
sort | one of newest, oldest, title, priceLow, priceHigh | no, default "newest" | |
limit | integer, 1 to 48 | no, default 12 |
Answer
| Field | Type | Description |
|---|---|---|
store | object | |
store.slug | string | |
store.name | string | |
market | object | |
market.slug | string | |
market.country | string | |
market.name | string | |
market.currency | string | |
market.language | string | |
open | boolean | |
products | list of objects | |
products[].id | string (uuid) | |
products[].handle | string | |
products[].title | string | |
products[].excerpt | string | |
products[].url | string | |
products[].image | object or null | |
products[].image.url | string | |
products[].image.alt | string | |
products[].price | object | |
products[].price.text | string | The price as the store shows it, such as "kr 199,00". |
products[].price.vat_label | string | Whether VAT is included, in the market's language. |
products[].price.from_label | string or null | "From" when the variants differ in price and this is the lowest. |
products[].price.prior_label | string or null | For a genuine reduction only: the words for the lowest price in the last 30 days. |
products[].price.prior_text | string or null | |
products[].price.unit_text | string or null | The unit price, such as "199,60 kr/kg", when the product has a content to compare by. |
products[].price.amount_minor | integer | |
products[].price.amount_decimal | string | The amount as a decimal written as text, such as "199.00". |
products[].price.currency | string | |
products[].cart | object | |
products[].cart.cartable | boolean | |
products[].cart.reason | one of booking, subscription, business_only, service or null | Why it cannot be put in a cart from another site, or null. |
products[].cart.variant_id | string (uuid) or null | |
products[].cart.variant_count | integer | |
products[].cart.sold_out | boolean | |
shop_url | string | |
labels | map of string to string | Words for a cart and a product page in the market's language; {n} stands for a number. |
Errors
| Status | Codes | When |
|---|---|---|
| 400 | invalid_request | The request could not be read: the error's code says which part. |
| 401 | unauthorized | No storefront token of this store in X-Storefront-Token. |
| 404 | not_found, no_such_market | No such store (or it is not open, sells nothing or is private), market, product or cart. |
| 429 | rate_limited | Too many calls; Retry-After says when to try again. |
Example request
curl
curl 'https://kaizenaflow.com/api/storefront/v1/your-store/products' \
-H "X-Storefront-Token: $KAIZENA_STOREFRONT_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/storefront/v1/your-store/products", {
headers: {
"X-Storefront-Token": process.env.KAIZENA_STOREFRONT_TOKEN,
},
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/storefront/v1/your-store/products",
headers={
"X-Storefront-Token": os.environ["KAIZENA_STOREFRONT_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)GET /products/{handle}
GET https://kaizenaflow.com/api/storefront/v1/{store}/products/{handle}
One product's page: its variants with their prices, stock and quantity rules.
Answers:
200, the answer.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
store | string | yes | The store, by its slug. |
handle | string | yes | The product's web address after /p/. |
Answer
| Field | Type | Description |
|---|---|---|
store | object | |
store.slug | string | |
store.name | string | |
market | object | |
market.slug | string | |
market.country | string | |
market.name | string | |
market.currency | string | |
market.language | string | |
open | boolean | |
product | object | |
product.id | string (uuid) | |
product.handle | string | |
product.title | string | |
product.description | string | |
product.seo_title | string | |
product.seo_description | string | |
product.url | string | |
product.images | list of objects | |
product.images[].url | string | |
product.images[].thumbnail | string | |
product.images[].alt | string | |
product.options | list of objects | |
product.options[].name | string | |
product.options[].values | list of string | |
product.variants | list of objects | |
product.variants[].id | string (uuid) | |
product.variants[].sku | string | |
product.variants[].options | map of string to string | |
product.variants[].price | object | |
product.variants[].price.text | string | The price as the store shows it, such as "kr 199,00". |
product.variants[].price.vat_label | string | Whether VAT is included, in the market's language. |
product.variants[].price.from_label | string or null | "From" when the variants differ in price and this is the lowest. |
product.variants[].price.prior_label | string or null | For a genuine reduction only: the words for the lowest price in the last 30 days. |
product.variants[].price.prior_text | string or null | |
product.variants[].price.unit_text | string or null | The unit price, such as "199,60 kr/kg", when the product has a content to compare by. |
product.variants[].price.amount_minor | integer | |
product.variants[].price.amount_decimal | string | The amount as a decimal written as text, such as "199.00". |
product.variants[].price.currency | string | |
product.variants[].image | object or null | |
product.variants[].image.url | string | |
product.variants[].image.thumbnail | string | |
product.variants[].image.alt | string | |
product.variants[].stock | object | |
product.variants[].stock.level | one of in_stock, low, out | |
product.variants[].stock.max | integer | |
product.variants[].stock.low | integer or null | |
product.variants[].backorder_days | integer or null | |
product.variants[].quantity_rule | object | How many at a time: the least, the most and the step. |
product.variants[].quantity_rule.min | integer | |
product.variants[].quantity_rule.max | integer | |
product.variants[].quantity_rule.step | integer | |
product.variants[].quantity_rule.text | string or null | |
product.cartable | boolean | |
product.reason | one of booking, subscription, business_only, service or null | Why it cannot be put in a cart from another site, or null. |
labels | map of string to string | Words for a cart and a product page in the market's language; {n} stands for a number. |
Errors
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | No storefront token of this store in X-Storefront-Token. |
| 404 | not_found, no_such_product | No such store (or it is not open, sells nothing or is private), market, product or cart. |
| 429 | rate_limited | Too many calls; Retry-After says when to try again. |
Example request
curl
curl 'https://kaizenaflow.com/api/storefront/v1/your-store/products/linen-shirt' \
-H "X-Storefront-Token: $KAIZENA_STOREFRONT_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/storefront/v1/your-store/products/linen-shirt", {
headers: {
"X-Storefront-Token": process.env.KAIZENA_STOREFRONT_TOKEN,
},
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/storefront/v1/your-store/products/linen-shirt",
headers={
"X-Storefront-Token": os.environ["KAIZENA_STOREFRONT_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)GET /categories
GET https://kaizenaflow.com/api/storefront/v1/{store}/categories
The store's product categories and tags.
Answers:
200, the answer.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
store | string | yes | The store, by its slug. |
Answer
| Field | Type | Description |
|---|---|---|
categories | list of objects | |
categories[].id | string (uuid) | |
categories[].name | string | |
categories[].depth | integer | |
tags | list of objects | |
tags[].id | string (uuid) | |
tags[].name | string |
Errors
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | No storefront token of this store in X-Storefront-Token. |
| 404 | not_found | No such store (or it is not open, sells nothing or is private), market, product or cart. |
| 429 | rate_limited | Too many calls; Retry-After says when to try again. |
Example request
curl
curl 'https://kaizenaflow.com/api/storefront/v1/your-store/categories' \
-H "X-Storefront-Token: $KAIZENA_STOREFRONT_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/storefront/v1/your-store/categories", {
headers: {
"X-Storefront-Token": process.env.KAIZENA_STOREFRONT_TOKEN,
},
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/storefront/v1/your-store/categories",
headers={
"X-Storefront-Token": os.environ["KAIZENA_STOREFRONT_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)