4 operations. Every schema and example on this page is generated from the platform contract.
Cancel a collection occurrence. scope='one' (default) writes an exception + removes the unbooked slot; scope='following' caps the matching recurring window’s recurrence_until to the day before. Both resync the rolling slots (booked slots preserved). Inputs are supplied as query parameters.
Store whose occurrence to cancel (also authorises the merchant).
YYYY-MM-DD of the occurrence to cancel.
HH:MM start time of the occurrence to cancel.
'one' (default) writes an exception + removes the unbooked slot (delete-this-one); 'following' caps the matching recurring window’s recurrence_until to the day before (delete-this-and-following).
onefollowingRow id (present on read).
0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.
YYYY-MM-DD for a one-off date window; null for recurring.
HH:MM.
HH:MM.
Per-window slot length; null → store default.
Per-window max orders per slot; null → store default.
Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.
curl -X DELETE "https://www.membber.com/api/v1/collection-windows?store_id=6659c139-0000-4000-8000-d0c500000066&slot_date=%3Cslot_date%3E&start_time=%3Cstart_time%3E" \
-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/collection-windows", {
params: { query: { store_id: "6659c139-0000-4000-8000-d0c500000066", slot_date: "<slot_date>", start_time: "<start_time>" } },
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.cancelCollectionOccurrence(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066", slotDate: "<slot_date>", startTime: "<start_time>")
).ok.body.json
print(response){
"windows": [
{
"id": "00000d1b-0000-4000-8000-d0c500000000",
"day_of_week": 1,
"specific_date": "<specific_date>",
"start_time": "<start_time>",
"end_time": "<end_time>",
"slot_minutes": 1,
"orders_per_slot": 1,
"sort_order": 1,
"recurrence_until": "<recurrence_until>"
}
]
}Merchant read of the store’s recurring/one-off collection windows.
Store whose collection windows to fetch (also authorises the merchant).
Row id (present on read).
0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.
YYYY-MM-DD for a one-off date window; null for recurring.
HH:MM.
HH:MM.
Per-window slot length; null → store default.
Per-window max orders per slot; null → store default.
Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.
curl -G "https://www.membber.com/api/v1/collection-windows" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
--data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.GET("/api/v1/collection-windows", {
params: { query: { store_id: "6659c139-0000-4000-8000-d0c500000066" } },
});
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.getCollectionWindows(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066")
).ok.body.json
print(response){
"windows": [
{
"id": "00000d1b-0000-4000-8000-d0c500000000",
"day_of_week": 1,
"specific_date": "<specific_date>",
"start_time": "<start_time>",
"end_time": "<end_time>",
"slot_minutes": 1,
"orders_per_slot": 1,
"sort_order": 1,
"recurrence_until": "<recurrence_until>"
}
]
}Removes the single-occurrence cancellation written by DELETE …?scope=one and re-materialises the slot, clamped to the store’s book-ahead horizon on the store’s own timezone. Idempotent: restoring something that is not cancelled returns restored=false, not an error. Without this, closing one slot is irreversible.
Store whose occurrence to restore (also authorises the merchant).
YYYY-MM-DD of the occurrence to put back.
HH:MM start time of the occurrence to put back.
true when a cancellation existed and was removed; false = there was nothing to undo (not an error).
Slots materialised by putting it back (0 when it sits beyond the book-ahead horizon).
Was the date inside the store’s book-ahead horizon, measured on the STORE’s clock?
Is there a real, bookable slot row for it now?
The store’s collection windows (unchanged by a restore; echoed for parity with DELETE).
Row id (present on read).
0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.
YYYY-MM-DD for a one-off date window; null for recurring.
HH:MM.
HH:MM.
Per-window slot length; null → store default.
Per-window max orders per slot; null → store default.
Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.
curl -X POST "https://www.membber.com/api/v1/collection-windows" \
-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",
"slot_date": "<slot_date>",
"start_time": "<start_time>"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/collection-windows", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066",
slot_date: "<slot_date>",
start_time: "<start_time>"
},
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.restoreCollectionOccurrence(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066",
slotDate: "<slot_date>",
startTime: "<start_time>"
))
).ok.body.json
print(response){
"restored": true,
"slots": -9007199254740991,
"within_horizon": true,
"materialised": true,
"windows": [
{
"id": "00000d1b-0000-4000-8000-d0c500000000",
"day_of_week": 1,
"specific_date": "<specific_date>",
"start_time": "<start_time>",
"end_time": "<end_time>",
"slot_minutes": 1,
"orders_per_slot": 1,
"sort_order": 1,
"recurrence_until": "<recurrence_until>"
}
]
}Replaces the entire collection-window set atomically (single RPC, no partial states) and regenerates the rolling slot window so the change is live for customers immediately. Idempotent (full-set replace).
Store whose windows to replace (also authorises the merchant).
The FULL new window set, replaces the existing set atomically.
The saved window set.
Row id (present on read).
0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.
YYYY-MM-DD for a one-off date window; null for recurring.
HH:MM.
HH:MM.
Per-window slot length; null → store default.
Per-window max orders per slot; null → store default.
Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.
Number of rolling slots regenerated so the change is live immediately.
curl -X PUT "https://www.membber.com/api/v1/collection-windows" \
-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",
"windows": [
{
"start_time": "<start_time>",
"end_time": "<end_time>"
}
]
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.PUT("/api/v1/collection-windows", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066",
windows: [
{
start_time: "<start_time>",
end_time: "<end_time>"
}
]
},
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.replaceCollectionWindows(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066",
windows: [.init(
startTime: "<start_time>",
endTime: "<end_time>"
)]
))
).ok.body.json
print(response){
"windows": [
{
"id": "00000d1b-0000-4000-8000-d0c500000000",
"day_of_week": 1,
"specific_date": "<specific_date>",
"start_time": "<start_time>",
"end_time": "<end_time>",
"slot_minutes": 1,
"orders_per_slot": 1,
"sort_order": 1,
"recurrence_until": "<recurrence_until>"
}
],
"slots": 1
}