Products
Products as the admin keeps them.
| Operation | Method and path | Scope |
|---|---|---|
| List products | GET /products | products:read |
| Get a product | GET /products/{id} | products:read |
| Create a draft product | POST /products | products:write |
| Change a draft product | PATCH /products/{id} | products:write |
| Publish a product | POST /products/{id}/publish | products:publish |
| Take a product off the site | POST /products/{id}/unpublish | products:publish |
| Archive a product | POST /products/{id}/archive | products:publish |
| Bring an archived product back | POST /products/{id}/unarchive | products:publish |
List products
GET https://kaizenaflow.com/api/admin/v1/products
The store's products, newest first, each with its variants and every market's price in the market's own currency.
Operation:
products.listScope:
products:read, orproducts:write, which reads tooAnswers:
200, a page: the rows underdata, andnextfor the page after.Pages: at most 100 rows, 50 when
limitis left out; give an answer'snextas?after=for the page after.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer, 1 to 100 | no | Rows a page holds, at most 100; 50 when left out. A larger number gives 100. |
after | string, at most 200 characters | no | The next cursor of the page before; the first page when left out. |
updated_after | string (date-time) | no | Only what was made or changed after this time (ISO 8601 with its offset), for incremental sync. |
status | one of draft, active, archived | no | Only products in this state; any other value lists every state. |
Answer
| Field | Type | Description |
|---|---|---|
data | list of objects | |
data[].id | string (uuid) | |
data[].handle | string | Its web address after /p/. |
data[].title | string | Its title in the store's main language. |
data[].status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data[].kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data[].created_at | string (date-time) | |
data[].updated_at | string (date-time) | |
data[].variants | list of objects | |
data[].variants[].id | string (uuid) | |
data[].variants[].sku | string or null | |
data[].variants[].active | boolean | |
data[].variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data[].variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data[].variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data[].variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data[].variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
next | string or null | The cursor of the next page, given as ?after=; null on the last page. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl 'https://kaizenaflow.com/api/admin/v1/products' \
-H "Authorization: Bearer $KAIZENA_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products", {
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
},
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Get a product
GET https://kaizenaflow.com/api/admin/v1/products/{id}
One product with its variants and prices.
Operation:
products.getScope:
products:read, orproducts:write, which reads tooAnswers:
200, the answer underdata.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f' \
-H "Authorization: Bearer $KAIZENA_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f", {
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
},
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Create a draft product
POST https://kaizenaflow.com/api/admin/v1/products
Makes a product as a draft, through the product editor's own save: its words, prices per market as typed in each market's currency, options, variants, stock and categories. Its pictures are added with POST /products/{id}/media, and it is published with POST /products/{id}/publish (the power products:publish) or in the admin.
Operation:
products.createScope:
products:writeAnswers:
201, made: the answer underdata.Once only: with an
Idempotency-Keyheader.
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
title | string, 1 to 200 characters | yes | The product's name in the store's main language. |
description | string, at most 10,000 characters | no, default "" | Plain text in the main language; paragraphs separated by a blank line. |
seo_title | string, at most 120 characters | no, default "" | The title search results show; the product's title when empty. |
seo_description | string, at most 320 characters | no, default "" | The description search results show; the start of the description when empty. |
excerpt | string, at most 300 characters | no, default "" | A short text for lists and product grids; the start of the description when empty. |
translations | list of objects, at most 10 items | no, default [] | Its words in the store's other languages, one entry per language. |
translations[].language | string, 2 to 10 characters | yes | A language of the store, by its code from store_overview (such as nb-NO or sv), as its main language unless given. |
translations[].title | string, at most 200 characters | no | |
translations[].description | string, at most 10,000 characters | no | |
translations[].seo_title | string, at most 120 characters | no | |
translations[].seo_description | string, at most 320 characters | no | |
translations[].excerpt | string, at most 300 characters | no | |
handle | string, at most 80 characters | no | The product's web address after /p/, in lowercase letters, digits and hyphens; made from the title when left out. |
prices | map of string, 2 to 60 characters to string, 1 to 20 characters | no | Price per country, keyed by the country's code from store_overview (such as NO or SE), as text in that country's own currency: "249" or "249,50". With VAT, as shoppers pay; a store that sells only to businesses gives prices without VAT, as its product editor does. A country left out is not priced, and the product is not sold there until it is. Used for every variant that gives none of its own. |
stock | integer, 0 to 1,000,000 | no, default 0 | Units in stock of each variant to start with. |
weight_grams | integer, 0 to 1,000,000 | no | Each unit's weight with its packaging, for shipping by weight. |
options | list of objects, at most 3 items | no, default [] | Up to 3 options shoppers choose between, such as Size and Colour. |
options[].name | string, 1 to 40 characters | yes | Such as Size or Colour. |
options[].values | list of string, 1 to 60 characters, 1 to 50 items | yes | Such as S, M, L. |
variants | list of objects, 1 to 2,048 items | no | Leave out for one variant without options, or for every combination of the options. Give them to set a variant's own SKU, price, stock or weight. |
variants[].options | map of string to string | no, default {} | The variant's value for each option, such as {"Size": "M"}; leave out for a product without options. |
variants[].sku | string, 1 to 64 characters | no | Its stock-keeping code, unique in the store; made from the address and the options when left out. |
variants[].prices | map of string, 2 to 60 characters to string, 1 to 20 characters | no | Its own prices; the product's prices when left out. |
variants[].stock | integer, 0 to 1,000,000 | no | Units in stock to start with; the product's stock when left out. |
variants[].weight_grams | integer, 0 to 1,000,000 | no | |
variants[].cost | string, at most 20 characters | no | What one costs the store, without VAT, in its main currency, such as "120"; for profit figures. |
variants[].gtin | string, matching ^[0-9]{8,14}$ | no | |
variants[].content | object | no | What one holds, for the price per kg, litre or metre shoppers are shown (needed in some categories, such as food). |
variants[].content.amount | string, 1 to 20 characters | yes | What one pack holds, as text: "0,75" or "250". |
variants[].content.unit | one of g, kg, ml, cl, l, cm, m, m2, piece | yes | |
variants[].not_sold_in | list of string, 2 to 60 characters, at most 60 items | no | Countries (codes from store_overview, such as SE, or names) where it is not sold, though it keeps its price there; [] sells it everywhere it has a price. |
variants[].min_quantity | integer, 1 to 9,999 | no | The fewest one order line may hold; a whole number of quantity_step. |
variants[].max_quantity | integer, 1 to 9,999 or null | no | The most one order line may hold (null: no limit of its own); a whole number of quantity_step. |
variants[].quantity_step | integer, 1 to 9,999 | no | Sold in multiples of this, such as 6 for a box of six; 1 sells any number. |
categories | list of string, 1 to 80 characters, at most 20 items | no, default [] | Product categories by name or address; one the store does not have is made. |
tags | list of string, 1 to 80 characters, at most 20 items | no, default [] | Product tags by name or address; one the store does not have is made. |
vat_category | string, matching ^[a-z][a-z0-9_]{1,30}$ | no | Its VAT category, such as standard or food; standard when left out. |
manufacturer | one of 2 shapes | no | Who makes it, required on goods for sale in the EU; the store's first company when left out. |
responsible_person | one of 2 shapes | no | A person or company in the EU responsible for its safety, required when the manufacturer is outside the EU. |
bundle | object | no | Makes it a bundle of other goods of the store, sold together as one product: its stock is what its components allow, so it has no stock of its own. |
bundle.components | list of objects, 1 to 20 items | yes | The goods in it, by SKU (from get_product or list_products), with how many of each go in one bundle; at least two units in all. |
bundle.components[].sku | string, 1 to 64 characters | yes | |
bundle.components[].quantity | integer, 1 to 99 | no, default 1 | |
bundle.pricing | one of fixed, computed | no, default "computed" | computed: its components' prices less percent_off, kept up to date; fixed: its own prices. |
bundle.percent_off | integer, 0 to 90 | no, default 0 | For a computed price: whole percent off the components' sum. |
not_sold_in | list of string, 2 to 60 characters, at most 60 items | no | Countries (codes from store_overview, such as SE, or names) where it is not sold, though it keeps its price there; [] sells it everywhere it has a price. |
standard_category | string, 1 to 400 characters or null | no | What the product is in the standard product taxonomy that Google and marketplaces read (apart from the store's own categories): a category's id (such as aa-1-1) or its full English path (such as Apparel & Accessories > Clothing > Activewear). Anything else is answered with the closest categories to choose from. null takes it away. |
standard_attributes | map of string, 1 to 100 characters to list of string, 1 to 100 characters, at most 25 items | no | Values of the category's attributes by name in English, such as {"Color": ["Black"], "Pattern": ["Striped"]} (they replace the ones there; an empty list takes an attribute away). Only the category's own attributes and their values; get_product names them. |
manufacturer, shape 1 of 2
| Field | Type | Required | Description |
|---|---|---|---|
manufacturer | string, 1 to 200 characters | yes | One of the store's companies, by name. |
manufacturer, shape 2 of 2
| Field | Type | Required | Description |
|---|---|---|---|
manufacturer.name | string, 1 to 200 characters | yes | |
manufacturer.postal_address | string, 5 to 300 characters | yes | |
manufacturer.contact | string, 3 to 200 characters | yes | An email or web address of the company. |
manufacturer.country | string, matching ^[A-Za-z]{2}$ | yes | Its country, as a two-letter code. |
responsible_person, shape 1 of 2
| Field | Type | Required | Description |
|---|---|---|---|
responsible_person | string, 1 to 200 characters | yes | One of the store's companies, by name. |
responsible_person, shape 2 of 2
| Field | Type | Required | Description |
|---|---|---|---|
responsible_person.name | string, 1 to 200 characters | yes | |
responsible_person.postal_address | string, 5 to 300 characters | yes | |
responsible_person.contact | string, 3 to 200 characters | yes | An email or web address of the company. |
responsible_person.country | string, matching ^[A-Za-z]{2}$ | yes | Its country, as a two-letter code. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 409 | conflict | Nothing was done: it clashes with how things are now (nothing left to send), or an Idempotency-Key is in use or was used for another request. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X POST 'https://kaizenaflow.com/api/admin/v1/products' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Linen shirt"}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Linen shirt"
}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products",
method="POST",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({
"title": "Linen shirt",
}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Change a draft product
PATCH https://kaizenaflow.com/api/admin/v1/products/{id}
Changes only the fields given, through the editor's save. A product on the site (active) is changed only by a token with the power products:publish, and is refused as gated without it. status itself is refused here as gated: it changes with POST /products/{id}/publish, /unpublish or /archive, or in the admin.
Operation:
products.updateScope:
products:writeAnswers:
200, the answer underdata.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
title | string, 1 to 200 characters | no | The title in the main language. |
description | string, at most 10,000 characters | no | Plain text in the main language; paragraphs separated by a blank line. |
seo_title | string, at most 120 characters | no | The title search results show; the product's title when empty. |
seo_description | string, at most 320 characters | no | The description search results show; the start of the description when empty. |
excerpt | string, at most 300 characters | no | A short text for lists and product grids; the start of the description when empty. |
translations | list of objects, at most 10 items | no | Words in other languages; only the fields given change. |
translations[].language | string, 2 to 10 characters | yes | A language of the store, by its code from store_overview (such as nb-NO or sv), as its main language unless given. |
translations[].title | string, at most 200 characters | no | |
translations[].description | string, at most 10,000 characters | no | |
translations[].seo_title | string, at most 120 characters | no | |
translations[].seo_description | string, at most 320 characters | no | |
translations[].excerpt | string, at most 300 characters | no | |
handle | string, at most 80 characters | no | A new web address; the old one is redirected to it. |
options | list of objects, at most 3 items | no | The options as they should be (they replace the ones there); every variant must then have a value for each. |
options[].name | string, 1 to 40 characters | yes | Such as Size or Colour. |
options[].values | list of string, 1 to 60 characters, 1 to 50 items | yes | Such as S, M, L. |
variants | list of objects, at most 2,048 items | no | |
variants[].sku | string, 1 to 64 characters | yes | The variant, by its SKU; a SKU the product does not have adds a variant. |
variants[].options | map of string to string | no | |
variants[].prices | map of string, 2 to 60 characters to string, at most 20 characters | no | Price per country, keyed by the country's code from store_overview (such as NO or SE), as text in that country's own currency: "249" or "249,50". With VAT, as shoppers pay; a store that sells only to businesses gives prices without VAT, as its product editor does. A country left out is not priced, and the product is not sold there until it is. Only the countries given change; "" takes a country's price away. |
variants[].stock | integer, 0 to 1,000,000 | no | Only for a new variant; an existing variant's stock is changed with set_stock. |
variants[].weight_grams | integer, 0 to 1,000,000 or null | no | |
variants[].cost | string, at most 20 characters | no | |
variants[].gtin | string, matching ^[0-9]{8,14}$ or null | no | |
variants[].content | object or null | no | What one holds, for the price per kg, litre or metre shoppers are shown (needed in some categories, such as food). |
variants[].content.amount | string, 1 to 20 characters | yes | What one pack holds, as text: "0,75" or "250". |
variants[].content.unit | one of g, kg, ml, cl, l, cm, m, m2, piece | yes | |
variants[].active | boolean | no | False switches the variant off (it is never deleted). |
variants[].not_sold_in | list of string, 2 to 60 characters, at most 60 items | no | Countries this variant is not sold in, as they should be (they replace its own list). |
variants[].min_quantity | integer, 1 to 9,999 | no | The fewest one order line may hold; a whole number of quantity_step. |
variants[].max_quantity | integer, 1 to 9,999 or null | no | The most one order line may hold (null: no limit of its own); a whole number of quantity_step. |
variants[].quantity_step | integer, 1 to 9,999 | no | Sold in multiples of this, such as 6 for a box of six; 1 sells any number. |
categories | list of string, 1 to 80 characters, at most 20 items | no | The product's categories as they should be (they replace the ones there); new ones are made. |
tags | list of string, 1 to 80 characters, at most 20 items | no | The product's tags as they should be (they replace the ones there); new ones are made. |
vat_category | string, matching ^[a-z][a-z0-9_]{1,30}$ | no | |
manufacturer | one of 2 shapes | no | |
responsible_person | one of 2 shapes | no | |
bundle | object | no | A bundle's components and pricing as they should be (they replace the ones there); only for a bundle. |
bundle.components | list of objects, 1 to 20 items | yes | The goods in it, by SKU (from get_product or list_products), with how many of each go in one bundle; at least two units in all. |
bundle.components[].sku | string, 1 to 64 characters | yes | |
bundle.components[].quantity | integer, 1 to 99 | no, default 1 | |
bundle.pricing | one of fixed, computed | no, default "computed" | computed: its components' prices less percent_off, kept up to date; fixed: its own prices. |
bundle.percent_off | integer, 0 to 90 | no, default 0 | For a computed price: whole percent off the components' sum. |
not_sold_in | list of string, 2 to 60 characters, at most 60 items | no | Countries the whole product is not sold in, as they should be (they replace the list there); its prices there are kept. |
price_on_request | boolean | no | Goods only. true: no price is shown anywhere and shoppers can only request a quote (its prices stay as the owner's guide); false: its price is shown and it is sold again. |
price_words | object | no | The words before and after this product's price (From, /pc): the store's, none, or its own by language. |
price_words.follow | one of store, none, own | yes | store: the store's words (Settings, Prices and quantity); none: no words around this product's price; own: the words given here. |
price_words.words | list of objects, at most 20 items | no | With own: the product's words by language; a language left out shows none. |
price_words.words[].language | string, 2 to 10 characters | yes | One of the store's languages, by code (nb, sv, en) or locale (nb-NO). |
price_words.words[].before | string, at most 96 characters | no, default "" | Shown before the price, such as From or Only (at most 24 characters); "" for none. |
price_words.words[].after | string, at most 96 characters | no, default "" | Shown after the price, such as /pc, per person or ,- (at most 24 characters); "" for none. |
standard_category | string, 1 to 400 characters or null | no | What the product is in the standard product taxonomy that Google and marketplaces read (apart from the store's own categories): a category's id (such as aa-1-1) or its full English path (such as Apparel & Accessories > Clothing > Activewear). Anything else is answered with the closest categories to choose from. null takes it away. |
standard_attributes | map of string, 1 to 100 characters to list of string, 1 to 100 characters, at most 25 items | no | Values of the category's attributes by name in English, such as {"Color": ["Black"], "Pattern": ["Striped"]} (they replace the ones there; an empty list takes an attribute away). Only the category's own attributes and their values; get_product names them. |
manufacturer, shape 1 of 2
| Field | Type | Required | Description |
|---|---|---|---|
manufacturer | string, 1 to 200 characters | yes | One of the store's companies, by name. |
manufacturer, shape 2 of 2
| Field | Type | Required | Description |
|---|---|---|---|
manufacturer.name | string, 1 to 200 characters | yes | |
manufacturer.postal_address | string, 5 to 300 characters | yes | |
manufacturer.contact | string, 3 to 200 characters | yes | An email or web address of the company. |
manufacturer.country | string, matching ^[A-Za-z]{2}$ | yes | Its country, as a two-letter code. |
responsible_person, shape 1 of 2
| Field | Type | Required | Description |
|---|---|---|---|
responsible_person | string, 1 to 200 characters | yes | One of the store's companies, by name. |
responsible_person, shape 2 of 2
| Field | Type | Required | Description |
|---|---|---|---|
responsible_person.name | string, 1 to 200 characters | yes | |
responsible_person.postal_address | string, 5 to 300 characters | yes | |
responsible_person.contact | string, 3 to 200 characters | yes | An email or web address of the company. |
responsible_person.country | string, matching ^[A-Za-z]{2}$ | yes | Its country, as a two-letter code. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 403 | gated | The request needs a power beside the operation's scope (the message names it): changing a product, category or address on the site, an import that would, or a customer's email. A copied order is never changed. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X PATCH 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Linen shirt"}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Linen shirt"
}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f",
method="PATCH",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({
"title": "Linen shirt",
}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Publish a product
POST https://kaizenaflow.com/api/admin/v1/products/{id}/publish
Puts a draft on the site, for sale, checked as the editor checks a product it publishes (prices, safety contacts, words). Answers the product.
Operation:
products.publishScope:
products:publishAnswers:
200, the answer underdata.Once only: with an
Idempotency-Keyheader.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
body | object | yes | Nothing: send {} or no body. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 409 | conflict | Nothing was done: it clashes with how things are now (nothing left to send), or an Idempotency-Key is in use or was used for another request. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X POST 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/publish' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/publish", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/publish",
method="POST",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Take a product off the site
POST https://kaizenaflow.com/api/admin/v1/products/{id}/unpublish
Makes a product on the site a draft again; nothing else changes.
Operation:
products.unpublishScope:
products:publishAnswers:
200, the answer underdata.Once only: with an
Idempotency-Keyheader.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
body | object | yes | Nothing: send {} or no body. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 409 | conflict | Nothing was done: it clashes with how things are now (nothing left to send), or an Idempotency-Key is in use or was used for another request. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X POST 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unpublish' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unpublish", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unpublish",
method="POST",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Archive a product
POST https://kaizenaflow.com/api/admin/v1/products/{id}/archive
Puts the product away, off the site and out of the admin's lists; product.archived is sent to endpoints that take it.
Operation:
products.archiveScope:
products:publishAnswers:
200, the answer underdata.Once only: with an
Idempotency-Keyheader.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
body | object | yes | Nothing: send {} or no body. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 409 | conflict | Nothing was done: it clashes with how things are now (nothing left to send), or an Idempotency-Key is in use or was used for another request. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X POST 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/archive' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/archive", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/archive",
method="POST",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Bring an archived product back
POST https://kaizenaflow.com/api/admin/v1/products/{id}/unarchive
Brings an archived product back as a draft, to publish again.
Operation:
products.unarchiveScope:
products:publishAnswers:
200, the answer underdata.Once only: with an
Idempotency-Keyheader.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | The thing's id in this store. |
Body
JSON, with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
body | object | yes | Nothing: send {} or no body. |
Answer
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.handle | string | Its web address after /p/. |
data.title | string | Its title in the store's main language. |
data.status | one of draft, active, archived | draft: off the site. active: on the site, for sale. archived: put away. |
data.kind | one of goods, appointment, stay, rental, gift_card, bundle | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | |
data.variants | list of objects | |
data.variants[].id | string (uuid) | |
data.variants[].sku | string or null | |
data.variants[].active | boolean | |
data.variants[].options | map of string to string or null | The variant's value of each option, such as { "Size": "M" }. |
data.variants[].prices | list of objects | The price kept for each market, in the market's own currency, VAT included. |
data.variants[].prices[].market | string | A market, by its code (the country's ISO 3166-1 code, such as NO). |
data.variants[].prices[].currency | string, matching ^[A-Z]{3}$ | An ISO 4217 code, such as NOK or EUR. |
data.variants[].prices[].amount_minor | integer | An amount in minor units of the currency (øre, cents), VAT included where the store's prices are. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No valid token in Authorization: Bearer kf_…, or one that was revoked. |
| 403 | forbidden | The token does not hold the scope the operation needs, or its owner does not hold the staff permission it needs in the store now (a store that is not open, as in the admin, keeps open only its orders, customers, reports and the owner's own pages such as its webhooks; its products, discounts, website and settings, read or changed, are refused); the message names which. |
| 404 | not_found | No such route, or nothing with that id in the token's store (another store's ids are simply not found). |
| 409 | conflict | Nothing was done: it clashes with how things are now (nothing left to send), or an Idempotency-Key is in use or was used for another request. |
| 422 | invalid | Nothing was done: a body, query or cursor that is not as described, or a check of the screen it goes through; the message says what. |
| 429 | rate_limited | More calls than the budget allows; Retry-After says how many seconds to wait. |
| 500 | failed | Something went wrong on our side; nothing more was done. It is safe to try again. |
Example request
curl
curl -X POST 'https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unarchive' \
-H "Authorization: Bearer $KAIZENA_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unarchive", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KAIZENA_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const answer = await response.json();Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://kaizenaflow.com/api/admin/v1/products/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f/unarchive",
method="POST",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
"Content-Type": "application/json",
},
data=json.dumps({}).encode(),
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)