Skip to content
Kaizena FlowDocs
Search

Search the docs

Admin API

A store's own data for the owner's integrations: products, categories, pictures and price lists, stock, orders, drafts and returns, customers, discounts, gift cards and subscriptions, pages and content, settings, reports, webhook endpoints and the product file, and checkout rules.

Every call goes to https://kaizenaflow.com/api/admin/v1/…. The OpenAPI 3.1 document of the same operations is /api/admin/v1/openapi.json.

Money is integer minor units with an ISO 4217 code. Lists are pages of at most 100 under a cursor: give a page's next as ?after= for the next one.

A token may make 120 calls a minute, and a store's tokens 1200 together; past that the answer is 429 with Retry-After.

A POST with an Idempotency-Key header is done once: the same key with the same request gets the first answer again for 24 hours (Idempotent-Replayed: true).

Within v1 nothing a caller relies on is renamed or removed; answers may gain fields.

Authentication

A token made in Settings, Apps and API: kf_ and 43 characters. Each operation names the scope it needs; a write scope reads too.

Send it on every call as Authorization: Bearer kf_…. Scopes says what each scope opens, Errors what a refusal means and Rate limits how many calls a minute a token may make.

Calls made once

Makes a POST happen once: the same key with the same request answers as the first time for 24 hours; with another request it is refused. The header is Idempotency-Key, at most 255 characters; an answer given again says Idempotent-Replayed: true.

Products

Products as the admin keeps them. Drafts are written with products:write; what shoppers see (publishing, a product on the site, archiving) only with products:publish.

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

Inventory

Stock per variant and location, adjusted or counted as the Inventory page does.

OperationMethod and pathScope
List stock locationsGET /inventory/locationsinventory:read
List stock levelsGET /inventory/levelsinventory:read
Adjust stockPOST /inventory/adjustinventory:write
Set stock to a countPOST /inventory/setinventory:write

Orders

Orders in their own currency, parcels with tracking, and invoices and credit notes as EN 16931 UBL.

OperationMethod and pathScope
List ordersGET /ordersorders:read
Get an orderGET /orders/{id}orders:read
Send a parcelPOST /orders/{id}/fulfillmentsorders:write
Get an invoice as UBLGET /invoices/{id}/ublorders:read
Get a credit note as UBLGET /credit-notes/{id}/ublorders:read
List an order's refundsGET /orders/{id}/refundsorders:read
Refund an orderPOST /orders/{id}/refundsorders:refund
Cancel an unpaid orderPOST /orders/{id}/cancelorders:refund
List an order's notesGET /orders/{id}/notesorders:read
Add a note to an orderPOST /orders/{id}/notesorders:manage
Tag an orderPOST /orders/{id}/tagsorders:manage
Remove an order's tagDELETE /orders/{id}/tags/{tag}orders:manage

Customers

Customer accounts and their tags.

OperationMethod and pathScope
List customersGET /customerscustomers:read
Get a customerGET /customers/{id}customers:read
Tag a customerPOST /customers/{id}/tagscustomers:write
Remove a customer's tagDELETE /customers/{id}/tags/{tag}customers:write
Send an event about a subscriberPOST /eventscustomers:manage
Create a customerPOST /customerscustomers:manage
Change a customerPATCH /customers/{id}customers:manage
Get a customer's store creditGET /customers/{id}/store-creditcustomers:read
Get a customer's bonus creditsGET /customers/{id}/loyaltycustomers:read

Discounts

Discount codes, made through the admin's own form.

OperationMethod and pathScope
List discount codesGET /discountsdiscounts:read
Create a discount codePOST /discountsdiscounts:write
Get a discount codeGET /discounts/{id}discounts:read
Change a discount codePATCH /discounts/{id}discounts:publish
Switch a discount code offPOST /discounts/{id}/disablediscounts:publish

Checkout

Checkout rules and the questions the checkout asks (D399).

OperationMethod and pathScope
List checkout rulesGET /checkout/rulescheckout:read
Create a checkout rulePOST /checkout/rulescheckout:write
Change or switch a checkout rulePATCH /checkout/rules/{id}checkout:write
Delete a checkout ruleDELETE /checkout/rules/{id}checkout:write
List checkout questionsGET /checkout/fieldscheckout:read
Create a checkout questionPOST /checkout/fieldscheckout:write
Change, switch or move a checkout questionPATCH /checkout/fields/{id}checkout:write
Delete a checkout questionDELETE /checkout/fields/{id}checkout:write

Categories and tags

Product categories and tags (D50), and a product put in or out of one.

OperationMethod and pathScope
List categoriesGET /categoriesproducts:read
Get a categoryGET /categories/{id}products:read
Create a categoryPOST /categoriesproducts:manage
Change a categoryPATCH /categories/{id}products:publish
Delete a categoryDELETE /categories/{id}products:publish
Put a product in a categoryPOST /categories/{id}/productsproducts:manage
Take a product out of a categoryDELETE /categories/{id}/products/{product_id}products:manage
List tagsGET /tagsproducts:read
Get a tagGET /tags/{id}products:read
Create a tagPOST /tagsproducts:manage
Change a tagPATCH /tags/{id}products:publish
Delete a tagDELETE /tags/{id}products:publish
Tag a productPOST /tags/{id}/productsproducts:manage
Take a tag off a productDELETE /tags/{id}/products/{product_id}products:manage

Media

The media library's pictures, sent through a one-time upload address and checked as the library checks them, and a product's gallery.

OperationMethod and pathScope
Start an uploadPOST /media/uploadsproducts:manage
Keep an uploaded picturePOST /mediaproducts:manage
List the media libraryGET /mediaproducts:read
Get a product's galleryGET /products/{id}/mediaproducts:read
Add a picture to a productPOST /products/{id}/mediaproducts:manage
Order a product's picturesPATCH /products/{id}/mediaproducts:manage
Take a picture off a productDELETE /products/{id}/media/{media_id}products:manage

Price lists

Price lists for customer groups and companies (D321), and their fixed prices.

OperationMethod and pathScope
List price listsGET /price-listsproducts:read
List a price list's pricesGET /price-lists/{id}/pricesproducts:read
Set a price list's pricesPOST /price-lists/{id}/pricesproducts:publish

Draft orders

Draft orders staff make and shoppers' requests for a quote (D173, D431), sent as a pay link or declined.

OperationMethod and pathScope
List draft ordersGET /draftsorders:read
Get a draft orderGET /drafts/{id}orders:read
Create a draft orderPOST /draftsorders:manage
Change a draft orderPATCH /drafts/{id}orders:manage
Send a draft orderPOST /drafts/{id}/sendorders:send
Decline a request for a quotePOST /drafts/{id}/declineorders:send

Returns

Withdrawals and voluntary returns (D153): approved, declined and received as the returns page does them.

OperationMethod and pathScope
List returnsGET /returnsorders:read
Get a returnGET /returns/{id}orders:read
Approve a returnPOST /returns/{id}/approveorders:send
Decline a returnPOST /returns/{id}/declineorders:send
Mark a return receivedPOST /returns/{id}/receiveorders:send

Segments

Saved segments of customers and subscribers (D296), with how many each holds.

OperationMethod and pathScope
List segmentsGET /segmentscustomers:read
Get a segmentGET /segments/{id}customers:read

Gift cards

Gift cards and store credit (D300, D364): issued, listed and deactivated; a code is never answered after its issue.

OperationMethod and pathScope
List gift cardsGET /gift-cardsgift_cards:write
Get a gift cardGET /gift-cards/{id}gift_cards:write
Issue a gift cardPOST /gift-cardsgift_cards:write
Deactivate a gift cardPOST /gift-cards/{id}/disablegift_cards:write

Subscriptions

Customers' subscriptions (D29): read, paused and cancelled as the subscription page does.

OperationMethod and pathScope
List subscriptionsGET /subscriptionsorders:read
Get a subscriptionGET /subscriptions/{id}orders:read
Pause a subscriptionPOST /subscriptions/{id}/pauseorders:send
Cancel a subscriptionPOST /subscriptions/{id}/cancelorders:send

Pages

The store's pages (D42): drafts written through the editor's own save; publishing with content:publish.

OperationMethod and pathScope
List pagesGET /pagescontent:read
Get a pageGET /pages/{id}content:read
Create a draft pagePOST /pagescontent:write
Save a page's draftPATCH /pages/{id}content:write
Publish a pagePOST /pages/{id}/publishcontent:publish

Blog

The store's blog articles (D57, D341), as pages are.

OperationMethod and pathScope
List blog articlesGET /articlescontent:read
Get a blog articleGET /articles/{id}content:read
Create a draft blog articlePOST /articlescontent:write
Save a blog article's draftPATCH /articles/{id}content:write
Publish a blog articlePOST /articles/{id}/publishcontent:publish

Content

Content types and their entries (D326).

OperationMethod and pathScope
List content typesGET /content-typescontent:read
List a type's entriesGET /content-types/{id}/entriescontent:read
Get an entryGET /content-entries/{id}content:read
Create an entryPOST /content-types/{id}/entriescontent:write
Save an entry's draftPATCH /content-entries/{id}content:write
Publish an entryPOST /content-entries/{id}/publishcontent:publish

The store's menus (D85), read.

OperationMethod and pathScope
List menusGET /menuscontent:read
Get a menuGET /menus/{id}content:read

Settings

The store's settings, read.

OperationMethod and pathScope
Get the store's settingsGET /settingssettings:read

Reports

Saved reports (D345), run on the data as it is now.

OperationMethod and pathScope
List saved reportsGET /reportsreports:read
Run a saved reportGET /reports/{id}/runreports:read

A/B tests

The store's A/B tests (D148), each as its page reads it: worked out by the store, read-only.

OperationMethod and pathScope
List A/B testsGET /experimentsreports:read
Get an A/B testGET /experiments/{id}reports:read

Webhook endpoints

The owner's own endpoints (D354) and their deliveries, with webhooks:write.

OperationMethod and pathScope
List webhook endpointsGET /webhookswebhooks:write
Add a webhook endpointPOST /webhookswebhooks:write
Change a webhook endpointPATCH /webhooks/{id}webhooks:write
Remove a webhook endpointDELETE /webhooks/{id}webhooks:write
List an endpoint's deliveriesGET /webhooks/{id}/deliverieswebhooks:write
Send a delivery againPOST /webhooks/{id}/deliveries/{delivery_id}/resendwebhooks:write

Bulk jobs

The product file of the Data page (D165): exported, and imported with a dry run first.

OperationMethod and pathScope
Export the product filePOST /jobs/product-exportsproducts:read
Start a product importPOST /jobs/product-importsproducts:manage
Check an uploaded product filePOST /jobs/product-imports/{id}/checkproducts:manage
Apply a checked importPOST /jobs/{id}/applyproducts:manage
Poll a jobGET /jobs/{id}products:read
Download a job's fileGET /jobs/{id}/downloadproducts:read

Forms

The store's forms (D705): read, made and changed with forms:write; their responses read with the right to read customers.

OperationMethod and pathScope
List formsGET /formsforms:read
Get a formGET /forms/{id}forms:read
List a form's responsesGET /forms/{id}/responsesforms:read
Make a formPOST /formsforms:write
Change a formPATCH /forms/{id}forms:write

Contracts

Contracts for deals (D695): read with customers:read, with their signers in order; never a signer's email or the words.

OperationMethod and pathScope
List contractsGET /contractscustomers:read
Get a contractGET /contracts/{id}customers:read

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

Was this page helpful?