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'.
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>"
}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.
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.
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": {}
}