Skip to content
Kaizena FlowDocs
Search

Search the docs

Products

Products as the admin keeps them.

OperationMethod and pathScope
List productsGET /productsproducts:read
Get a productGET /products/{id}products:read
Create a draft productPOST /productsproducts:write
Change a draft productPATCH /products/{id}products:write
Publish a productPOST /products/{id}/publishproducts:publish
Take a product off the sitePOST /products/{id}/unpublishproducts:publish
Archive a productPOST /products/{id}/archiveproducts:publish
Bring an archived product backPOST /products/{id}/unarchiveproducts: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.list

  • Scope: products:read, or products:write, which reads too

  • Answers: 200, a page: the rows under data, and next for the page after.

  • Pages: at most 100 rows, 50 when limit is left out; give an answer's next as ?after= for the page after.

Query parameters

NameTypeRequiredDescription
limitinteger, 1 to 100noRows a page holds, at most 100; 50 when left out. A larger number gives 100.
afterstring, at most 200 charactersnoThe next cursor of the page before; the first page when left out.
updated_afterstring (date-time)noOnly what was made or changed after this time (ISO 8601 with its offset), for incremental sync.
statusone of draft, active, archivednoOnly products in this state; any other value lists every state.

Answer

FieldTypeDescription
datalist of objects
data[].idstring (uuid)
data[].handlestringIts web address after /p/.
data[].titlestringIts title in the store's main language.
data[].statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data[].kindone of goods, appointment, stay, rental, gift_card, bundle
data[].created_atstring (date-time)
data[].updated_atstring (date-time)
data[].variantslist of objects
data[].variants[].idstring (uuid)
data[].variants[].skustring or null
data[].variants[].activeboolean
data[].variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data[].variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data[].variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data[].variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data[].variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.
nextstring or nullThe cursor of the next page, given as ?after=; null on the last page.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
titlestring, 1 to 200 charactersyesThe product's name in the store's main language.
descriptionstring, at most 10,000 charactersno, default ""Plain text in the main language; paragraphs separated by a blank line.
seo_titlestring, at most 120 charactersno, default ""The title search results show; the product's title when empty.
seo_descriptionstring, at most 320 charactersno, default ""The description search results show; the start of the description when empty.
excerptstring, at most 300 charactersno, default ""A short text for lists and product grids; the start of the description when empty.
translationslist of objects, at most 10 itemsno, default []Its words in the store's other languages, one entry per language.
translations[].languagestring, 2 to 10 charactersyesA language of the store, by its code from store_overview (such as nb-NO or sv), as its main language unless given.
translations[].titlestring, at most 200 charactersno
translations[].descriptionstring, at most 10,000 charactersno
translations[].seo_titlestring, at most 120 charactersno
translations[].seo_descriptionstring, at most 320 charactersno
translations[].excerptstring, at most 300 charactersno
handlestring, at most 80 charactersnoThe product's web address after /p/, in lowercase letters, digits and hyphens; made from the title when left out.
pricesmap of string, 2 to 60 characters to string, 1 to 20 charactersnoPrice 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.
stockinteger, 0 to 1,000,000no, default 0Units in stock of each variant to start with.
weight_gramsinteger, 0 to 1,000,000noEach unit's weight with its packaging, for shipping by weight.
optionslist of objects, at most 3 itemsno, default []Up to 3 options shoppers choose between, such as Size and Colour.
options[].namestring, 1 to 40 charactersyesSuch as Size or Colour.
options[].valueslist of string, 1 to 60 characters, 1 to 50 itemsyesSuch as S, M, L.
variantslist of objects, 1 to 2,048 itemsnoLeave 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[].optionsmap of string to stringno, default {}The variant's value for each option, such as {"Size": "M"}; leave out for a product without options.
variants[].skustring, 1 to 64 charactersnoIts stock-keeping code, unique in the store; made from the address and the options when left out.
variants[].pricesmap of string, 2 to 60 characters to string, 1 to 20 charactersnoIts own prices; the product's prices when left out.
variants[].stockinteger, 0 to 1,000,000noUnits in stock to start with; the product's stock when left out.
variants[].weight_gramsinteger, 0 to 1,000,000no
variants[].coststring, at most 20 charactersnoWhat one costs the store, without VAT, in its main currency, such as "120"; for profit figures.
variants[].gtinstring, matching ^[0-9]{8,14}$no
variants[].contentobjectnoWhat one holds, for the price per kg, litre or metre shoppers are shown (needed in some categories, such as food).
variants[].content.amountstring, 1 to 20 charactersyesWhat one pack holds, as text: "0,75" or "250".
variants[].content.unitone of g, kg, ml, cl, l, cm, m, m2, pieceyes
variants[].not_sold_inlist of string, 2 to 60 characters, at most 60 itemsnoCountries (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_quantityinteger, 1 to 9,999noThe fewest one order line may hold; a whole number of quantity_step.
variants[].max_quantityinteger, 1 to 9,999 or nullnoThe most one order line may hold (null: no limit of its own); a whole number of quantity_step.
variants[].quantity_stepinteger, 1 to 9,999noSold in multiples of this, such as 6 for a box of six; 1 sells any number.
categorieslist of string, 1 to 80 characters, at most 20 itemsno, default []Product categories by name or address; one the store does not have is made.
tagslist of string, 1 to 80 characters, at most 20 itemsno, default []Product tags by name or address; one the store does not have is made.
vat_categorystring, matching ^[a-z][a-z0-9_]{1,30}$noIts VAT category, such as standard or food; standard when left out.
manufacturerone of 2 shapesnoWho makes it, required on goods for sale in the EU; the store's first company when left out.
responsible_personone of 2 shapesnoA person or company in the EU responsible for its safety, required when the manufacturer is outside the EU.
bundleobjectnoMakes 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.componentslist of objects, 1 to 20 itemsyesThe 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[].skustring, 1 to 64 charactersyes
bundle.components[].quantityinteger, 1 to 99no, default 1
bundle.pricingone of fixed, computedno, default "computed"computed: its components' prices less percent_off, kept up to date; fixed: its own prices.
bundle.percent_offinteger, 0 to 90no, default 0For a computed price: whole percent off the components' sum.
not_sold_inlist of string, 2 to 60 characters, at most 60 itemsnoCountries (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_categorystring, 1 to 400 characters or nullnoWhat 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_attributesmap of string, 1 to 100 characters to list of string, 1 to 100 characters, at most 25 itemsnoValues 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

FieldTypeRequiredDescription
manufacturerstring, 1 to 200 charactersyesOne of the store's companies, by name.

manufacturer, shape 2 of 2

FieldTypeRequiredDescription
manufacturer.namestring, 1 to 200 charactersyes
manufacturer.postal_addressstring, 5 to 300 charactersyes
manufacturer.contactstring, 3 to 200 charactersyesAn email or web address of the company.
manufacturer.countrystring, matching ^[A-Za-z]{2}$yesIts country, as a two-letter code.

responsible_person, shape 1 of 2

FieldTypeRequiredDescription
responsible_personstring, 1 to 200 charactersyesOne of the store's companies, by name.

responsible_person, shape 2 of 2

FieldTypeRequiredDescription
responsible_person.namestring, 1 to 200 charactersyes
responsible_person.postal_addressstring, 5 to 300 charactersyes
responsible_person.contactstring, 3 to 200 charactersyesAn email or web address of the company.
responsible_person.countrystring, matching ^[A-Za-z]{2}$yesIts country, as a two-letter code.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
409conflictNothing 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.update

  • Scope: products:write

  • Answers: 200, the answer under data.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
titlestring, 1 to 200 charactersnoThe title in the main language.
descriptionstring, at most 10,000 charactersnoPlain text in the main language; paragraphs separated by a blank line.
seo_titlestring, at most 120 charactersnoThe title search results show; the product's title when empty.
seo_descriptionstring, at most 320 charactersnoThe description search results show; the start of the description when empty.
excerptstring, at most 300 charactersnoA short text for lists and product grids; the start of the description when empty.
translationslist of objects, at most 10 itemsnoWords in other languages; only the fields given change.
translations[].languagestring, 2 to 10 charactersyesA language of the store, by its code from store_overview (such as nb-NO or sv), as its main language unless given.
translations[].titlestring, at most 200 charactersno
translations[].descriptionstring, at most 10,000 charactersno
translations[].seo_titlestring, at most 120 charactersno
translations[].seo_descriptionstring, at most 320 charactersno
translations[].excerptstring, at most 300 charactersno
handlestring, at most 80 charactersnoA new web address; the old one is redirected to it.
optionslist of objects, at most 3 itemsnoThe options as they should be (they replace the ones there); every variant must then have a value for each.
options[].namestring, 1 to 40 charactersyesSuch as Size or Colour.
options[].valueslist of string, 1 to 60 characters, 1 to 50 itemsyesSuch as S, M, L.
variantslist of objects, at most 2,048 itemsno
variants[].skustring, 1 to 64 charactersyesThe variant, by its SKU; a SKU the product does not have adds a variant.
variants[].optionsmap of string to stringno
variants[].pricesmap of string, 2 to 60 characters to string, at most 20 charactersnoPrice 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[].stockinteger, 0 to 1,000,000noOnly for a new variant; an existing variant's stock is changed with set_stock.
variants[].weight_gramsinteger, 0 to 1,000,000 or nullno
variants[].coststring, at most 20 charactersno
variants[].gtinstring, matching ^[0-9]{8,14}$ or nullno
variants[].contentobject or nullnoWhat one holds, for the price per kg, litre or metre shoppers are shown (needed in some categories, such as food).
variants[].content.amountstring, 1 to 20 charactersyesWhat one pack holds, as text: "0,75" or "250".
variants[].content.unitone of g, kg, ml, cl, l, cm, m, m2, pieceyes
variants[].activebooleannoFalse switches the variant off (it is never deleted).
variants[].not_sold_inlist of string, 2 to 60 characters, at most 60 itemsnoCountries this variant is not sold in, as they should be (they replace its own list).
variants[].min_quantityinteger, 1 to 9,999noThe fewest one order line may hold; a whole number of quantity_step.
variants[].max_quantityinteger, 1 to 9,999 or nullnoThe most one order line may hold (null: no limit of its own); a whole number of quantity_step.
variants[].quantity_stepinteger, 1 to 9,999noSold in multiples of this, such as 6 for a box of six; 1 sells any number.
categorieslist of string, 1 to 80 characters, at most 20 itemsnoThe product's categories as they should be (they replace the ones there); new ones are made.
tagslist of string, 1 to 80 characters, at most 20 itemsnoThe product's tags as they should be (they replace the ones there); new ones are made.
vat_categorystring, matching ^[a-z][a-z0-9_]{1,30}$no
manufacturerone of 2 shapesno
responsible_personone of 2 shapesno
bundleobjectnoA bundle's components and pricing as they should be (they replace the ones there); only for a bundle.
bundle.componentslist of objects, 1 to 20 itemsyesThe 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[].skustring, 1 to 64 charactersyes
bundle.components[].quantityinteger, 1 to 99no, default 1
bundle.pricingone of fixed, computedno, default "computed"computed: its components' prices less percent_off, kept up to date; fixed: its own prices.
bundle.percent_offinteger, 0 to 90no, default 0For a computed price: whole percent off the components' sum.
not_sold_inlist of string, 2 to 60 characters, at most 60 itemsnoCountries the whole product is not sold in, as they should be (they replace the list there); its prices there are kept.
price_on_requestbooleannoGoods 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_wordsobjectnoThe words before and after this product's price (From, /pc): the store's, none, or its own by language.
price_words.followone of store, none, ownyesstore: the store's words (Settings, Prices and quantity); none: no words around this product's price; own: the words given here.
price_words.wordslist of objects, at most 20 itemsnoWith own: the product's words by language; a language left out shows none.
price_words.words[].languagestring, 2 to 10 charactersyesOne of the store's languages, by code (nb, sv, en) or locale (nb-NO).
price_words.words[].beforestring, at most 96 charactersno, default ""Shown before the price, such as From or Only (at most 24 characters); "" for none.
price_words.words[].afterstring, at most 96 charactersno, default ""Shown after the price, such as /pc, per person or ,- (at most 24 characters); "" for none.
standard_categorystring, 1 to 400 characters or nullnoWhat 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_attributesmap of string, 1 to 100 characters to list of string, 1 to 100 characters, at most 25 itemsnoValues 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

FieldTypeRequiredDescription
manufacturerstring, 1 to 200 charactersyesOne of the store's companies, by name.

manufacturer, shape 2 of 2

FieldTypeRequiredDescription
manufacturer.namestring, 1 to 200 charactersyes
manufacturer.postal_addressstring, 5 to 300 charactersyes
manufacturer.contactstring, 3 to 200 charactersyesAn email or web address of the company.
manufacturer.countrystring, matching ^[A-Za-z]{2}$yesIts country, as a two-letter code.

responsible_person, shape 1 of 2

FieldTypeRequiredDescription
responsible_personstring, 1 to 200 charactersyesOne of the store's companies, by name.

responsible_person, shape 2 of 2

FieldTypeRequiredDescription
responsible_person.namestring, 1 to 200 charactersyes
responsible_person.postal_addressstring, 5 to 300 charactersyes
responsible_person.contactstring, 3 to 200 charactersyesAn email or web address of the company.
responsible_person.countrystring, matching ^[A-Za-z]{2}$yesIts country, as a two-letter code.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
403gatedThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
bodyobjectyesNothing: send {} or no body.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
409conflictNothing 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
bodyobjectyesNothing: send {} or no body.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
409conflictNothing 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
bodyobjectyesNothing: send {} or no body.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
409conflictNothing 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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.

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe thing's id in this store.

Body

JSON, with Content-Type: application/json.

FieldTypeRequiredDescription
bodyobjectyesNothing: send {} or no body.

Answer

FieldTypeDescription
dataobject
data.idstring (uuid)
data.handlestringIts web address after /p/.
data.titlestringIts title in the store's main language.
data.statusone of draft, active, archiveddraft: off the site. active: on the site, for sale. archived: put away.
data.kindone of goods, appointment, stay, rental, gift_card, bundle
data.created_atstring (date-time)
data.updated_atstring (date-time)
data.variantslist of objects
data.variants[].idstring (uuid)
data.variants[].skustring or null
data.variants[].activeboolean
data.variants[].optionsmap of string to string or nullThe variant's value of each option, such as { "Size": "M" }.
data.variants[].priceslist of objectsThe price kept for each market, in the market's own currency, VAT included.
data.variants[].prices[].marketstringA market, by its code (the country's ISO 3166-1 code, such as NO).
data.variants[].prices[].currencystring, matching ^[A-Z]{3}$An ISO 4217 code, such as NOK or EUR.
data.variants[].prices[].amount_minorintegerAn amount in minor units of the currency (øre, cents), VAT included where the store's prices are.

Errors

StatusCodeWhen
401unauthorizedNo valid token in Authorization: Bearer kf_…, or one that was revoked.
403forbiddenThe 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.
404not_foundNo such route, or nothing with that id in the token's store (another store's ids are simply not found).
409conflictNothing 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.
422invalidNothing 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.
429rate_limitedMore calls than the budget allows; Retry-After says how many seconds to wait.
500failedSomething 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)

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

Was this page helpful?