Skip to content
Kaizena FlowDocs
Search

Search the docs

Catalogue

Products, a product's page and the categories, as the token's market shows them.

OperationWhat it does
GET /productsProducts 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 /categoriesThe 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

NameTypeRequiredDescription
storestringyesThe store, by its slug.

Query parameters

NameTypeRequiredDescription
categorystring (uuid)no
tagstring (uuid)no
sortone of newest, oldest, title, priceLow, priceHighno, default "newest"
limitinteger, 1 to 48no, default 12

Answer

FieldTypeDescription
storeobject
store.slugstring
store.namestring
marketobject
market.slugstring
market.countrystring
market.namestring
market.currencystring
market.languagestring
openboolean
productslist of objects
products[].idstring (uuid)
products[].handlestring
products[].titlestring
products[].excerptstring
products[].urlstring
products[].imageobject or null
products[].image.urlstring
products[].image.altstring
products[].priceobject
products[].price.textstringThe price as the store shows it, such as "kr 199,00".
products[].price.vat_labelstringWhether VAT is included, in the market's language.
products[].price.from_labelstring or null"From" when the variants differ in price and this is the lowest.
products[].price.prior_labelstring or nullFor a genuine reduction only: the words for the lowest price in the last 30 days.
products[].price.prior_textstring or null
products[].price.unit_textstring or nullThe unit price, such as "199,60 kr/kg", when the product has a content to compare by.
products[].price.amount_minorinteger
products[].price.amount_decimalstringThe amount as a decimal written as text, such as "199.00".
products[].price.currencystring
products[].cartobject
products[].cart.cartableboolean
products[].cart.reasonone of booking, subscription, business_only, service or nullWhy it cannot be put in a cart from another site, or null.
products[].cart.variant_idstring (uuid) or null
products[].cart.variant_countinteger
products[].cart.sold_outboolean
shop_urlstring
labelsmap of string to stringWords for a cart and a product page in the market's language; {n} stands for a number.

Errors

StatusCodesWhen
400invalid_requestThe request could not be read: the error's code says which part.
401unauthorizedNo storefront token of this store in X-Storefront-Token.
404not_found, no_such_marketNo such store (or it is not open, sells nothing or is private), market, product or cart.
429rate_limitedToo 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

NameTypeRequiredDescription
storestringyesThe store, by its slug.
handlestringyesThe product's web address after /p/.

Answer

FieldTypeDescription
storeobject
store.slugstring
store.namestring
marketobject
market.slugstring
market.countrystring
market.namestring
market.currencystring
market.languagestring
openboolean
productobject
product.idstring (uuid)
product.handlestring
product.titlestring
product.descriptionstring
product.seo_titlestring
product.seo_descriptionstring
product.urlstring
product.imageslist of objects
product.images[].urlstring
product.images[].thumbnailstring
product.images[].altstring
product.optionslist of objects
product.options[].namestring
product.options[].valueslist of string
product.variantslist of objects
product.variants[].idstring (uuid)
product.variants[].skustring
product.variants[].optionsmap of string to string
product.variants[].priceobject
product.variants[].price.textstringThe price as the store shows it, such as "kr 199,00".
product.variants[].price.vat_labelstringWhether VAT is included, in the market's language.
product.variants[].price.from_labelstring or null"From" when the variants differ in price and this is the lowest.
product.variants[].price.prior_labelstring or nullFor a genuine reduction only: the words for the lowest price in the last 30 days.
product.variants[].price.prior_textstring or null
product.variants[].price.unit_textstring or nullThe unit price, such as "199,60 kr/kg", when the product has a content to compare by.
product.variants[].price.amount_minorinteger
product.variants[].price.amount_decimalstringThe amount as a decimal written as text, such as "199.00".
product.variants[].price.currencystring
product.variants[].imageobject or null
product.variants[].image.urlstring
product.variants[].image.thumbnailstring
product.variants[].image.altstring
product.variants[].stockobject
product.variants[].stock.levelone of in_stock, low, out
product.variants[].stock.maxinteger
product.variants[].stock.lowinteger or null
product.variants[].backorder_daysinteger or null
product.variants[].quantity_ruleobjectHow many at a time: the least, the most and the step.
product.variants[].quantity_rule.mininteger
product.variants[].quantity_rule.maxinteger
product.variants[].quantity_rule.stepinteger
product.variants[].quantity_rule.textstring or null
product.cartableboolean
product.reasonone of booking, subscription, business_only, service or nullWhy it cannot be put in a cart from another site, or null.
labelsmap of string to stringWords for a cart and a product page in the market's language; {n} stands for a number.

Errors

StatusCodesWhen
401unauthorizedNo storefront token of this store in X-Storefront-Token.
404not_found, no_such_productNo such store (or it is not open, sells nothing or is private), market, product or cart.
429rate_limitedToo 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

NameTypeRequiredDescription
storestringyesThe store, by its slug.

Answer

FieldTypeDescription
categorieslist of objects
categories[].idstring (uuid)
categories[].namestring
categories[].depthinteger
tagslist of objects
tags[].idstring (uuid)
tags[].namestring

Errors

StatusCodesWhen
401unauthorizedNo storefront token of this store in X-Storefront-Token.
404not_foundNo such store (or it is not open, sells nothing or is private), market, product or cart.
429rate_limitedToo 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)

Made from the API contract, version 1.57This page as Markdown

Was this page helpful?