2 operations. Every schema and example on this page is generated from the platform contract.
Public, because a customer deciding whether to book needs to see the cancellation terms BEFORE they commit, and a partner rendering our availability must be able to state them accurately rather than invent them.
The store whose booking terms you want.
How far ahead a booking must be made.
How far ahead booking is open.
How long a slot is reserved while paying.
'appointments_only' | 'walk_ins_only' | 'mixed'.
What deposit this store takes: {"type":"none"} | {"type":"flat","amount_pence":N} | {"type":"percent","percent":N} | {"type":"per_head",…}. Exposed on the READ because the merchant setup screen has to show what is currently set, and because a fee can only ever be taken from a deposit, so a partner rendering the terms cannot state them honestly without it.
Who chooses the table: 0 the restaurant seats the party, 1 the diner picks where to sit (the customer app shows the floor plan), 2 reserved. On the READ because the merchant setup screen has to show which one is live. Null only when the store has no policy row, which behaves exactly as 0.
curl -G "https://www.membber.com/api/v1/booking-policies" \
--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/booking-policies", {
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.getBookingPolicies(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066")
).ok.body.json
print(response){
"cancel_window_hours": 1,
"cancel_fee_percent": 1,
"no_show_fee_percent": 1,
"lead_time_min": 1,
"horizon_days": 1,
"slot_increment_min": 1,
"hold_ttl_min": 1,
"walkin_mode": "<walkin_mode>",
"deposit_policy": {},
"table_choice_level": 1
}Creates or partially updates the store booking policy (one row per store). Only the fields you send change; the rest keep their current value or the store default. Idempotent, the same write converges on the same row. Deposit/fee fields are stored but do not move money until the money stage. For a restaurant, `table_choice_level` is the floor-plan switch: 1 lets diners see the room and pick where to sit, 0 hands seating back to the restaurant.
How long before the appointment a free cancel is allowed.
Percent of price charged for a late cancel. WRITABLE but INERT until the money stage.
Percent of price charged for a no-show. WRITABLE but INERT until the money stage.
How far ahead a booking must be made, in minutes.
How far ahead booking is open, in days.
The customer-facing slot grain, in minutes.
How long a slot is reserved while paying, in minutes.
'appointments_only' | 'walk_ins_only' | 'mixed'.
appointments_onlywalk_ins_onlymixed'appointments' (chairs) | 'tables' (restaurant). Seeded from the signup category.
appointmentstablesDeposit policy JSON. WRITABLE but INERT, no charge is wired from it here.
Who chooses the table when a diner books online: 0 = the restaurant seats them (the default), 1 = the diner sees the room and picks where to sit (the customer app shows the floor plan). 2 is reserved and refused.
Who chooses the table: 0 the restaurant, 1 the diner, 2 reserved (only ever set by hand).
curl -X PUT "https://www.membber.com/api/v1/booking-policies" \
-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"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.PUT("/api/v1/booking-policies", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066"
},
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.writeBookingPolicy(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066"
))
).ok.body.json
print(response){
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"cancel_window_hours": 1,
"cancel_fee_percent": 1,
"no_show_fee_percent": 1,
"lead_time_min": 1,
"horizon_days": 1,
"slot_increment_min": 1,
"hold_ttl_min": 1,
"walkin_mode": "<walkin_mode>",
"booking_mode": "<booking_mode>",
"deposit_policy": {},
"table_choice_level": 1
}