2 operations. Every schema and example on this page is generated from the platform contract.
Per-store notification preferences for the signed-in customer: one row per store they have interacted with, with the mute + per-category toggles (messages, class reminders, class / voucher / stamp / membership / penalty events, marketing). Messages-muted and marketing default off; every other category defaults on.
Store the preferences belong to.
Store display name, or 'Unknown' if unavailable.
Chat messages muted for this store (defaults off).
Class reminder notifications (defaults on).
Class event notifications (defaults on).
Voucher event notifications (defaults on).
Stamp event notifications (defaults on).
Membership event notifications (defaults on).
Penalty event notifications (defaults on).
Marketing notifications (defaults off).
curl -G "https://www.membber.com/api/v1/notifications/preferences" \
-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/notifications/preferences");
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.listNotificationPreferences().ok.body.json
print(response){
"preferences": [
{
"storeId": "8fb04ddc-0000-4000-8000-d0c50000008f",
"storeName": "<storeName>",
"messagesMuted": true,
"classReminders": true,
"classEventsEnabled": true,
"voucherEventsEnabled": true,
"stampEventsEnabled": true,
"membershipEventsEnabled": true,
"penaltyEventsEnabled": true,
"marketingEnabled": true
}
]
}Upsert one store's notification preferences for the signed-in customer: the mute toggle plus the per-category flags (messages, class reminders, class / voucher / stamp / membership / penalty events, marketing). Any toggle omitted from the body is left unchanged. Idempotent via the (customer_id, store_id) unique key, a repeat call merges the same row, never a duplicate.
Store whose notification preferences to upsert (the target, not identity).
Mute chat messages for this store. Omit to leave unchanged.
Class reminder notifications. Omit to leave unchanged.
Class event notifications. Omit to leave unchanged.
Voucher event notifications. Omit to leave unchanged.
Stamp event notifications. Omit to leave unchanged.
Membership event notifications. Omit to leave unchanged.
Penalty event notifications. Omit to leave unchanged.
Marketing notifications. Omit to leave unchanged.
The store the preferences were written for.
Always true on a successful upsert (the row was created or merged).
curl -X POST "https://www.membber.com/api/v1/notifications/preferences" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"storeId": "8fb04ddc-0000-4000-8000-d0c50000008f"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/notifications/preferences", {
body: {
storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"
},
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.upsertNotificationPreference(
body: .json(.init(
storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"
))
).ok.body.json
print(response){
"storeId": "8fb04ddc-0000-4000-8000-d0c50000008f",
"updated": true
}