3 operations. Every schema and example on this page is generated from the platform contract.
/api/v1/menu/collectionsRemoves the row and its membership list. The FOOD is untouched, a row is a shelf, not a product. To hide a row without losing the work, set `is_active` false instead.
curl -X DELETE "https://www.membber.com/api/v1/menu/collections?id=00000d1b-0000-4000-8000-d0c500000000" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.DELETE("/api/v1/menu/collections", {
params: { query: { id: "00000d1b-0000-4000-8000-d0c500000000" } },
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.deleteMenuCollection(
query: .init(id: "00000d1b-0000-4000-8000-d0c500000000")
).ok.body.json
print(response){
"deleted": true
}Every row the merchant has made for her shop page ("Just baked", "Movie night"), with the items in each and the weekday or date window she set. Inactive rows are included so she can switch one back on.
null = every day.
YYYY-MM-DD, inclusive. null = no start.
YYYY-MM-DD, inclusive. null = it never retires.
curl -G "https://www.membber.com/api/v1/menu/collections" \
-H "Authorization: Bearer $MEMBBER_TOKEN"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.GET("/api/v1/menu/collections");
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.listMenuCollections().ok.body.json
print(response){
"collections": [
{
"id": "00000d1b-0000-4000-8000-d0c500000000",
"title": "Morning class",
"subtitle": "<subtitle>",
"sort_order": -9007199254740991,
"is_active": true,
"days_of_week": [
0
],
"starts_on": "<starts_on>",
"ends_on": "<ends_on>",
"items": [
{
"menu_item_id": "ca65a6e7-0000-4000-8000-d0c5000000ca",
"sort_order": 0
}
]
}
]
}Creates a row when `id` is absent, updates it when present. `item_ids` REPLACES the row's contents in the order given, so a reorder and a removal are the same call. Items must belong to this store, the database refuses anything else.
Omit to create, send to update.
The merchant's own words. Shown verbatim as the heading.
null or omitted = every day.
The items in the row, IN HER ORDER. Replaces the whole list, send it complete.
null = every day.
YYYY-MM-DD, inclusive. null = no start.
YYYY-MM-DD, inclusive. null = it never retires.
curl -X POST "https://www.membber.com/api/v1/menu/collections" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"title": "Morning class",
"item_ids": [
"7e22b9c7-0000-4000-8000-d0c50000007e"
]
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/menu/collections", {
body: {
title: "Morning class",
item_ids: [
"7e22b9c7-0000-4000-8000-d0c50000007e"
]
},
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.saveMenuCollection(
body: .json(.init(
title: "Morning class",
itemIds: ["7e22b9c7-0000-4000-8000-d0c50000007e"]
))
).ok.body.json
print(response){
"collection": {
"id": "00000d1b-0000-4000-8000-d0c500000000",
"title": "Morning class",
"subtitle": "<subtitle>",
"sort_order": -9007199254740991,
"is_active": true,
"days_of_week": [
0
],
"starts_on": "<starts_on>",
"ends_on": "<ends_on>",
"items": [
{
"menu_item_id": "ca65a6e7-0000-4000-8000-d0c5000000ca",
"sort_order": 0
}
]
}
}