Menus
The store's menus (D85), read.
| Operation | Method and path | Scope |
|---|---|---|
| List menus | GET /menus | content:read |
| Get a menu | GET /menus/{id} | content:read |
List menus
GET https://kaizenaflow.com/api/admin/v1/menus
The store's menus with their links.
Operation:
menus.listScope:
content:read, orcontent:write, which reads tooAnswers:
200, the answer underdata.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
updated_after | string (date-time) | no | Only what was made or changed after this time (ISO 8601 with its offset), for incremental sync. |
Answer
| Field | Type | Description |
|---|---|---|
data | list of objects | |
data[].id | string (uuid) | |
data[].name | string | |
data[].items | list of any | The menu's links as the menu editor keeps them, nested. |
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/menus' \
-H "Authorization: Bearer $KAIZENA_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/menus", {
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/menus",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)Get a menu
GET https://kaizenaflow.com/api/admin/v1/menus/{id}
One menu with its links.
Operation:
menus.getScope:
content:read, orcontent: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.name | string | |
data.items | list of any | The menu's links as the menu editor keeps them, nested. |
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/menus/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f' \
-H "Authorization: Bearer $KAIZENA_TOKEN"JavaScript
const response = await fetch("https://kaizenaflow.com/api/admin/v1/menus/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/menus/3f2b8c1e-6d4a-4b9e-8c7f-1a2b3c4d5e6f",
headers={
"Authorization": "Bearer " + os.environ["KAIZENA_TOKEN"],
},
)
with urllib.request.urlopen(request) as response:
answer = json.load(response)