API referenceSettings

Settings

10 operations. Every schema and example on this page is generated from the platform contract.

Fetch a store's VAT and retention Reply-To settings.

Merchant read of a store's configuration: VAT registration + rate (surfaced on payout breakdowns) and the retention Reply-To inbox address stamped on outgoing lifecycle email. Consolidates the legacy settings/vat and settings/reply-to reads into one configuration read.

Parameters

store_idstring · uuidqueryrequired

Store whose settings to fetch (also authorises the merchant).

Response, 200

vat_registeredbooleanrequired

Whether the store is VAT-registered.

vat_rate_percentnumber, nullablerequired

VAT rate percent (0-100) when registered, else null.

reply_to_emailstring, nullablerequired

Customer-facing Reply-To address for retention email, or null when unset.

curl -G "https://www.membber.com/api/v1/settings" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "vat_registered": true,
  "vat_rate_percent": 1,
  "reply_to_email": "alex@example.com"
}

Get the store’s class booking rules.

Returns the store’s `gym_class_settings`. A store that has never saved these gets the platform DEFAULTS (7 days advance booking, 12:00 Europe/London release, 2h cancellation window, waitlist on with max 10, no venue cap, 2h reminder) rather than an error, so the settings screen always has something real to render.

Parameters

store_idstring · uuidqueryrequired

Store whose class rules these are (also authorises the merchant).

Response, 200

settingsobjectrequired

The store’s `gym_class_settings` row: { store_id, advance_booking_days, daily_release_time, release_timezone, cancellation_window_hours, waitlist_enabled, max_waitlist_size, venue_capacity, reminder_hours_before, updated_at }.

curl -G "https://www.membber.com/api/v1/settings/classes" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "settings": {}
}

Update the store’s class booking rules (partial patch).

Upserts `gym_class_settings`. ONLY the keys you send are written, so nudging one stepper can never silently reset another rule; when no row exists yet the insert is seeded with the platform defaults first. Every change writes a plan-activity row describing what moved, categorised as a cancellation-rule change when the cancellation window moved (it changes whether a member’s cancel is free) and a booking-rule change otherwise. Idempotency `rpc`: the upsert is keyed on store_id, so a retry converges on the same row.

Request body

store_idstring · uuidrequired

Store whose class rules these are (also authorises the merchant).

advance_booking_daysintegeroptional

How many days ahead members may book, 1-90.

daily_release_timestringoptional

When each day’s classes open for booking, "HH:MM" or "HH:MM:SS".

release_timezonestringoptional

IANA timezone the release time is interpreted in (e.g. Europe/London).

cancellation_window_hoursintegeroptional

How long before a class a member may cancel free of penalty, 0-168 hours.

waitlist_enabledbooleanoptional

Whether full classes accept a waitlist.

max_waitlist_sizeintegeroptional

Cap on waitlist length.

venue_capacityinteger, nullableoptional

Total people the venue holds across overlapping classes. null = no cap.

reminder_hours_beforeintegeroptional

How many hours before a class reminders send.

Response, 200

settingsobjectrequired

The full settings row after the update.

curl -X PUT "https://www.membber.com/api/v1/settings/classes" \
  -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"
  }'
Response, 200
{
  "settings": {}
}

Read which gym charge receipts this store emails to members.

auth merchant:readop getStoreReceiptSettingsrate limitederrors

Parameters

store_idstring · uuidqueryrequired

Store whose receipt switches to read (also authorises the merchant).

Response, 200

successbooleanrequired
receipt_dropin_enabledbooleanrequired

Email the member a receipt when they pay for a single drop-in class.

receipt_pack_enabledbooleanrequired

Email the member a receipt when they buy a class pack.

receipt_noshow_fee_enabledbooleanrequired

Email the member a receipt when a missed-class fee is charged. Defaults FALSE (founder decision D1): the fee is visible in the app and on the bank statement either way, so the email mainly invites an argument.

curl -G "https://www.membber.com/api/v1/settings/receipts" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "success": true,
  "receipt_dropin_enabled": true,
  "receipt_pack_enabled": true,
  "receipt_noshow_fee_enabled": true
}

Turn gym charge receipts on or off for this store.

Request body

store_idstring · uuidrequired

Store whose receipt switches to update (also authorises the merchant).

receipt_dropin_enabledbooleanoptional
receipt_pack_enabledbooleanoptional
receipt_noshow_fee_enabledbooleanoptional

Response, 200

successbooleanrequired
receipt_dropin_enabledbooleanrequired

Email the member a receipt when they pay for a single drop-in class.

receipt_pack_enabledbooleanrequired

Email the member a receipt when they buy a class pack.

receipt_noshow_fee_enabledbooleanrequired

Email the member a receipt when a missed-class fee is charged. Defaults FALSE (founder decision D1): the fee is visible in the app and on the bank statement either way, so the email mainly invites an argument.

curl -X PUT "https://www.membber.com/api/v1/settings/receipts" \
  -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"
  }'
Response, 200
{
  "success": true,
  "receipt_dropin_enabled": true,
  "receipt_pack_enabled": true,
  "receipt_noshow_fee_enabled": true
}

Update a store's Retention reply-to inbox email.

Merchant sets (or clears) the customer-facing Reply-To address stamped on outgoing retention / lifecycle emails. Blank clears it. Single-row atomic UPDATE + an admin_audit_log row on every save. Faithful migration of the legacy PUT settings/reply-to. No money is touched.

Request body

store_idstring · uuidrequired

Store whose reply-to inbox to update (also authorises the merchant).

reply_to_emailstring, nullableoptional

Reply-to inbox email. null / omitted / blank clears it (stored NULL). Non-blank values are trimmed + lowercased before validation.

Response, 200

reply_to_emailstring, nullablerequired

The persisted reply-to inbox (null when cleared).

curl -X PUT "https://www.membber.com/api/v1/settings/reply-to" \
  -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"
  }'
Response, 200
{
  "reply_to_email": "alex@example.com"
}

Release the claimed sender name; campaigns return to the shared address.

Gives the local part back to the pool (someone else can claim it). Idempotent: releasing a store that holds nothing is a successful no-op. An audit_logs row records every release. No money is touched.

Parameters

store_idstring · uuidqueryrequired

Store releasing its sender identity (also authorises the merchant).

Response, 200

successbooleanrequired
sender_local_partstring, nullablerequired

The claimed local part (before the @), or null when the store sends from the shared address.

sender_display_namestring, nullablerequired

Stored display-name override. null means the store name is used at send time (current behaviour for every store).

from_addressstringrequired

The campaign From address this store sends from right now: the claimed local part applied to the platform campaign domain, or the shared campaign address when nothing is claimed. Preview this verbatim; never assemble an address client-side.

curl -X DELETE "https://www.membber.com/api/v1/settings/sender-identity?store_id=6659c139-0000-4000-8000-d0c500000066" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"
Response, 200
{
  "success": true,
  "sender_local_part": "<sender_local_part>",
  "sender_display_name": "<sender_display_name>",
  "from_address": "<from_address>"
}

Read a store's email sender identity and its effective From address.

auth merchant:readop getStoreSenderIdentityrate limitederrors

Parameters

store_idstring · uuidqueryrequired

Store whose sender identity to read (also authorises the merchant).

Response, 200

successbooleanrequired
sender_local_partstring, nullablerequired

The claimed local part (before the @), or null when the store sends from the shared address.

sender_display_namestring, nullablerequired

Stored display-name override. null means the store name is used at send time (current behaviour for every store).

from_addressstringrequired

The campaign From address this store sends from right now: the claimed local part applied to the platform campaign domain, or the shared campaign address when nothing is claimed. Preview this verbatim; never assemble an address client-side.

curl -G "https://www.membber.com/api/v1/settings/sender-identity" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "success": true,
  "sender_local_part": "<sender_local_part>",
  "sender_display_name": "<sender_display_name>",
  "from_address": "<from_address>"
}

Claim (or change) the sender name this store sends campaign email from.

First-come-first-served claim of a local part on the shared campaign domain. The server normalises the requested name, enforces the denylist, and answers a collision with IDENTITY_TAKEN plus availability-checked suggestions. Atomic single-row upsert + an audit_logs row on every claim. No money is touched.

Request body

store_idstring · uuidrequired

Store claiming the identity (also authorises the merchant).

local_partstringrequired

Requested sender name (the part before the @). The server normalises it exactly like the store slug (lowercase, spaces to hyphens, apostrophes dropped, & becomes "and") and then requires 2-63 chars of [a-z0-9.-] starting with a letter or number. Rejections: INVALID_FORMAT, RESERVED_WORD, IDENTITY_TAKEN (409, details.suggestions).

display_namestring, nullableoptional

Sender display name. Omit to keep the stored value; null or blank clears it, and the store name is then used at send time.

Response, 200

successbooleanrequired
sender_local_partstring, nullablerequired

The claimed local part (before the @), or null when the store sends from the shared address.

sender_display_namestring, nullablerequired

Stored display-name override. null means the store name is used at send time (current behaviour for every store).

from_addressstringrequired

The campaign From address this store sends from right now: the claimed local part applied to the platform campaign domain, or the shared campaign address when nothing is claimed. Preview this verbatim; never assemble an address client-side.

curl -X PUT "https://www.membber.com/api/v1/settings/sender-identity" \
  -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",
    "local_part": "<local_part>"
  }'
Response, 200
{
  "success": true,
  "sender_local_part": "<sender_local_part>",
  "sender_display_name": "<sender_display_name>",
  "from_address": "<from_address>"
}

Update a store's VAT registration and rate.

Merchant sets whether the store is VAT-registered and, if so, the rate (0-100). Surfaced as the "Of which VAT (X%)" line on payout breakdowns; the payouts breakdown cache is busted on save. Config-write gated (can_manage_config). Faithful migration of the legacy PUT settings/vat.

Request body

store_idstring · uuidrequired

Store whose VAT settings to update (also authorises the merchant).

vat_registeredbooleanrequired

Whether the store is VAT-registered.

vat_rate_percentnumber, nullablerequired

VAT rate percent (0-100) when registered; ignored (stored null) when not registered.

Response, 200

vat_registeredbooleanrequired

The persisted VAT-registered flag.

vat_rate_percentnumber, nullablerequired

The persisted VAT rate percent (null when not registered).

curl -X PUT "https://www.membber.com/api/v1/settings/vat" \
  -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",
    "vat_registered": true,
    "vat_rate_percent": 1
  }'
Response, 200
{
  "vat_registered": true,
  "vat_rate_percent": 1
}
WhatsApp
Book a Call
Start Free