4 operations. Every schema and example on this page is generated from the platform contract.
Internal-admin. The shop's live booking-fee offer, what is left of it, and its history.
The live one, if any.
permanentperioddrop_countPeriod only: the first moment after it (midnight UK time after its last day).
daysmonthsFirst-N-drops only: how many drops it covers.
Drops it has in use.
Fee plans: waived (no fee), flat or tiered. Absent from an older database: 'waived'.
waivedflattieredFlat or tiered only: the bands.
The band top in pence, inclusive; null = no top (flat, or the last band).
The fee per order in this band, in pence (0 to 1000).
nonescheduledactiveendedrevokedpermanentperioddrop_countUK calendar days left, today included.
permanentperioddrop_countWaived always; flat and tiered only while DROPS_FEE_PLANS_ENABLED is on.
waivedflattieredpermanentperioddrop_countwaivedflattieredcurl -G "https://www.membber.com/api/v1/admin-drops-fee-offers/8fb04ddc-0000-4000-8000-d0c50000008f" \
-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/admin-drops-fee-offers/{storeId}", {
params: { path: { storeId: "8fb04ddc-0000-4000-8000-d0c50000008f" } },
});
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.adminDropsFeeOfferRead(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f")
).ok.body.json
print(response){
"offer": {
"id": "00000d1b-0000-4000-8000-d0c500000000",
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"kind": "permanent",
"starts_at": "<starts_at>",
"ends_at": "<ends_at>",
"period_unit": "days",
"period_length": 1,
"drop_allowance": 1,
"revoked_at": "<revoked_at>",
"used_drops": 1,
"plan": "waived",
"fee_bands": [
{
"up_to_pence": 1500,
"fee_pence": 1500
}
]
},
"status": {
"state": "none",
"kind": "permanent",
"lastMomentAt": "<lastMomentAt>",
"daysLeft": 1,
"dropsLeft": 1,
"dropAllowance": 1,
"startsAt": "<startsAt>"
},
"grantable_kinds": [
"permanent"
],
"grantable_plans": [
"waived"
],
"history": [
{
"action": "<action>",
"at": "<at>",
"actor_email": "alex@example.com",
"note": "Added at the front desk",
"kind": "permanent",
"plan": "waived"
}
]
}Internal-admin. Its length or its number of drops. Needs an Idempotency-Key. Audited.
Why, for the record. Required.
permanentperioddrop_countPeriod only: the first moment after it (midnight UK time after its last day).
daysmonthsFirst-N-drops only: how many drops it covers.
Drops it has in use.
Fee plans: waived (no fee), flat or tiered. Absent from an older database: 'waived'.
waivedflattieredFlat or tiered only: the bands.
The band top in pence, inclusive; null = no top (flat, or the last band).
The fee per order in this band, in pence (0 to 1000).
True when this Idempotency-Key was already used: the first answer, again.
curl -X PATCH "https://www.membber.com/api/v1/admin-drops-fee-offers/8fb04ddc-0000-4000-8000-d0c50000008f" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"offer_id": "d230e9de-0000-4000-8000-d0c5000000d2",
"period_length": 1,
"drop_allowance": 1,
"note": "Added at the front desk"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.PATCH("/api/v1/admin-drops-fee-offers/{storeId}", {
params: { path: { storeId: "8fb04ddc-0000-4000-8000-d0c50000008f" } },
body: {
offer_id: "d230e9de-0000-4000-8000-d0c5000000d2",
period_length: 1,
drop_allowance: 1,
note: "Added at the front desk"
},
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.adminDropsFeeOfferChange(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"),
body: .json(.init(
offerId: "d230e9de-0000-4000-8000-d0c5000000d2",
periodLength: 1,
dropAllowance: 1,
note: "Added at the front desk"
))
).ok.body.json
print(response){
"offer": {
"id": "00000d1b-0000-4000-8000-d0c500000000",
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"kind": "permanent",
"starts_at": "<starts_at>",
"ends_at": "<ends_at>",
"period_unit": "days",
"period_length": 1,
"drop_allowance": 1,
"revoked_at": "<revoked_at>",
"used_drops": 1,
"plan": "waived",
"fee_bands": [
{
"up_to_pence": 1500,
"fee_pence": 1500
}
]
},
"replayed": true
}Internal-admin. Sets this shop's booking fee plan: waived, a flat fee per order, or a tiered fee by order size; for good, for a period, or for its first N drops. One plan at a time (replace: true swaps it). Needs an Idempotency-Key. Audited.
permanent, period or drop_count.
Period only: days or months (UK calendar).
An offer starts when it is granted; a later start is refused.
Fee plans: waived (default), flat or tiered. Flat and tiered are refused (409 FEE_PLANS_OFF) while switched off.
Flat: one band with no top. Tiered: 2 to 10 bands, tops rising and inclusive, only the last open.
Revoke the live offer and grant this one in one step (one plan at a time).
Why, for the record. Required.
permanentperioddrop_countPeriod only: the first moment after it (midnight UK time after its last day).
daysmonthsFirst-N-drops only: how many drops it covers.
Drops it has in use.
Fee plans: waived (no fee), flat or tiered. Absent from an older database: 'waived'.
waivedflattieredFlat or tiered only: the bands.
The band top in pence, inclusive; null = no top (flat, or the last band).
The fee per order in this band, in pence (0 to 1000).
True when this Idempotency-Key was already used: the first answer, again.
curl -X POST "https://www.membber.com/api/v1/admin-drops-fee-offers/8fb04ddc-0000-4000-8000-d0c50000008f" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"kind": "<kind>",
"period_unit": "<period_unit>",
"period_length": 1,
"drop_allowance": 1,
"starts_at": "<starts_at>",
"plan": "<plan>",
"fee_bands": [
{
"fee_pence": 1500
}
],
"replace": true,
"note": "Added at the front desk"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/admin-drops-fee-offers/{storeId}", {
params: { path: { storeId: "8fb04ddc-0000-4000-8000-d0c50000008f" } },
body: {
kind: "<kind>",
period_unit: "<period_unit>",
period_length: 1,
drop_allowance: 1,
starts_at: "<starts_at>",
plan: "<plan>",
fee_bands: [
{
fee_pence: 1500
}
],
replace: true,
note: "Added at the front desk"
},
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.adminDropsFeeOfferGrant(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"),
body: .json(.init(
kind: "<kind>",
periodUnit: "<period_unit>",
periodLength: 1,
dropAllowance: 1,
startsAt: "<starts_at>",
plan: "<plan>",
feeBands: [.init(
feePence: 1500
)],
replace: true,
note: "Added at the front desk"
))
).ok.body.json
print(response){
"offer": {
"id": "00000d1b-0000-4000-8000-d0c500000000",
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"kind": "permanent",
"starts_at": "<starts_at>",
"ends_at": "<ends_at>",
"period_unit": "days",
"period_length": 1,
"drop_allowance": 1,
"revoked_at": "<revoked_at>",
"used_drops": 1,
"plan": "waived",
"fee_bands": [
{
"up_to_pence": 1500,
"fee_pence": 1500
}
]
},
"replayed": true
}Internal-admin. Drops already selling without the fee keep it until they close; paid orders keep what they paid. Needs an Idempotency-Key. Audited.
Why, for the record. Required.
permanentperioddrop_countPeriod only: the first moment after it (midnight UK time after its last day).
daysmonthsFirst-N-drops only: how many drops it covers.
Drops it has in use.
Fee plans: waived (no fee), flat or tiered. Absent from an older database: 'waived'.
waivedflattieredFlat or tiered only: the bands.
The band top in pence, inclusive; null = no top (flat, or the last band).
The fee per order in this band, in pence (0 to 1000).
True when this Idempotency-Key was already used: the first answer, again.
curl -X POST "https://www.membber.com/api/v1/admin-drops-fee-offers/8fb04ddc-0000-4000-8000-d0c50000008f/revoke" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"offer_id": "d230e9de-0000-4000-8000-d0c5000000d2",
"note": "Added at the front desk"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/admin-drops-fee-offers/{storeId}/revoke", {
params: { path: { storeId: "8fb04ddc-0000-4000-8000-d0c50000008f" } },
body: {
offer_id: "d230e9de-0000-4000-8000-d0c5000000d2",
note: "Added at the front desk"
},
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.adminDropsFeeOfferRevoke(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"),
body: .json(.init(
offerId: "d230e9de-0000-4000-8000-d0c5000000d2",
note: "Added at the front desk"
))
).ok.body.json
print(response){
"offer": {
"id": "00000d1b-0000-4000-8000-d0c500000000",
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"kind": "permanent",
"starts_at": "<starts_at>",
"ends_at": "<ends_at>",
"period_unit": "days",
"period_length": 1,
"drop_allowance": 1,
"revoked_at": "<revoked_at>",
"used_drops": 1,
"plan": "waived",
"fee_bands": [
{
"up_to_pence": 1500,
"fee_pence": 1500
}
]
},
"replayed": true
}