1 operation. Every schema and example on this page is generated from the platform contract.
The section default: every dish in the section that has no serving times of its own is served at these services. One atomic write (set_menu_section_service_periods RPC) replaces the section across every card, so a section can never be half-moved from Breakfast to Lunch. Idempotent. Writes one audit row and broadcasts a menu_item_updated realtime event.
Store whose menu section to set (also authorises the merchant).
One of the merchant's own menu sections (`menu_items.category`), matched case- and whitespace-insensitively. An unknown section is 422 MENU_SECTION_NOT_FOUND.
Every service this section is served at, replacing its current set across ALL cards at once. An empty array takes the section off every card, so its dishes (those without their own serving times) are served all day.
The section's canonical name, as the menu spells it.
curl -X PUT "https://www.membber.com/api/v1/menu-sections/service-periods" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"section": "<section>",
"service_period_ids": [
"af7d3b4f-0000-4000-8000-d0c5000000af"
]
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.PUT("/api/v1/menu-sections/service-periods", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066",
section: "<section>",
service_period_ids: [
"af7d3b4f-0000-4000-8000-d0c5000000af"
]
},
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.setMenuSectionServicePeriods(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066",
section: "<section>",
servicePeriodIds: ["af7d3b4f-0000-4000-8000-d0c5000000af"]
))
).ok.body.json
print(response){
"section": "<section>",
"service_period_ids": [
"af7d3b4f-0000-4000-8000-d0c5000000af"
]
}