API referenceSettings

Settings

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

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"
}

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