API referenceCollection windows

Collection windows

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

Cancel one collection occurrence (this-one or this-and-following).

Cancel a collection occurrence. scope='one' (default) writes an exception + removes the unbooked slot; scope='following' caps the matching recurring window’s recurrence_until to the day before. Both resync the rolling slots (booked slots preserved). Inputs are supplied as query parameters.

Parameters

store_idstring · uuidqueryrequired

Store whose occurrence to cancel (also authorises the merchant).

slot_datestringqueryrequired

YYYY-MM-DD of the occurrence to cancel.

start_timestringqueryrequired

HH:MM start time of the occurrence to cancel.

scopeenumqueryoptional

'one' (default) writes an exception + removes the unbooked slot (delete-this-one); 'following' caps the matching recurring window’s recurrence_until to the day before (delete-this-and-following).

onefollowing

Response, 200

windowsarray of objectrequired
9 child fields
idstringoptional

Row id (present on read).

day_of_weeknumber, nullablerequired

0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.

specific_datestring, nullablerequired

YYYY-MM-DD for a one-off date window; null for recurring.

start_timestringrequired

HH:MM.

end_timestringrequired

HH:MM.

slot_minutesnumber, nullablerequired

Per-window slot length; null → store default.

orders_per_slotnumber, nullablerequired

Per-window max orders per slot; null → store default.

sort_ordernumberrequired
recurrence_untilstring, nullableoptional

Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.

curl -X DELETE "https://www.membber.com/api/v1/collection-windows?store_id=6659c139-0000-4000-8000-d0c500000066&slot_date=%3Cslot_date%3E&start_time=%3Cstart_time%3E" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"
Response, 200
{
  "windows": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "day_of_week": 1,
      "specific_date": "<specific_date>",
      "start_time": "<start_time>",
      "end_time": "<end_time>",
      "slot_minutes": 1,
      "orders_per_slot": 1,
      "sort_order": 1,
      "recurrence_until": "<recurrence_until>"
    }
  ]
}

Fetch the store’s collection-window configuration.

Merchant read of the store’s recurring/one-off collection windows.

Parameters

store_idstring · uuidqueryrequired

Store whose collection windows to fetch (also authorises the merchant).

Response, 200

windowsarray of objectrequired
9 child fields
idstringoptional

Row id (present on read).

day_of_weeknumber, nullablerequired

0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.

specific_datestring, nullablerequired

YYYY-MM-DD for a one-off date window; null for recurring.

start_timestringrequired

HH:MM.

end_timestringrequired

HH:MM.

slot_minutesnumber, nullablerequired

Per-window slot length; null → store default.

orders_per_slotnumber, nullablerequired

Per-window max orders per slot; null → store default.

sort_ordernumberrequired
recurrence_untilstring, nullableoptional

Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.

curl -G "https://www.membber.com/api/v1/collection-windows" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  --data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"
Response, 200
{
  "windows": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "day_of_week": 1,
      "specific_date": "<specific_date>",
      "start_time": "<start_time>",
      "end_time": "<end_time>",
      "slot_minutes": 1,
      "orders_per_slot": 1,
      "sort_order": 1,
      "recurrence_until": "<recurrence_until>"
    }
  ]
}

Put a cancelled collection occurrence back (undo a this-one cancel).

Removes the single-occurrence cancellation written by DELETE …?scope=one and re-materialises the slot, clamped to the store’s book-ahead horizon on the store’s own timezone. Idempotent: restoring something that is not cancelled returns restored=false, not an error. Without this, closing one slot is irreversible.

Request body

store_idstring · uuidrequired

Store whose occurrence to restore (also authorises the merchant).

slot_datestringrequired

YYYY-MM-DD of the occurrence to put back.

start_timestringrequired

HH:MM start time of the occurrence to put back.

Response, 200

restoredbooleanrequired

true when a cancellation existed and was removed; false = there was nothing to undo (not an error).

slotsintegerrequired

Slots materialised by putting it back (0 when it sits beyond the book-ahead horizon).

within_horizonbooleanrequired

Was the date inside the store’s book-ahead horizon, measured on the STORE’s clock?

materialisedbooleanrequired

Is there a real, bookable slot row for it now?

windowsarray of objectrequired

The store’s collection windows (unchanged by a restore; echoed for parity with DELETE).

9 child fields
idstringoptional

Row id (present on read).

day_of_weeknumber, nullablerequired

0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.

specific_datestring, nullablerequired

YYYY-MM-DD for a one-off date window; null for recurring.

start_timestringrequired

HH:MM.

end_timestringrequired

HH:MM.

slot_minutesnumber, nullablerequired

Per-window slot length; null → store default.

orders_per_slotnumber, nullablerequired

Per-window max orders per slot; null → store default.

sort_ordernumberrequired
recurrence_untilstring, nullableoptional

Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.

curl -X POST "https://www.membber.com/api/v1/collection-windows" \
  -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",
    "slot_date": "<slot_date>",
    "start_time": "<start_time>"
  }'
Response, 200
{
  "restored": true,
  "slots": -9007199254740991,
  "within_horizon": true,
  "materialised": true,
  "windows": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "day_of_week": 1,
      "specific_date": "<specific_date>",
      "start_time": "<start_time>",
      "end_time": "<end_time>",
      "slot_minutes": 1,
      "orders_per_slot": 1,
      "sort_order": 1,
      "recurrence_until": "<recurrence_until>"
    }
  ]
}

Replace the store’s whole collection-window set.

Replaces the entire collection-window set atomically (single RPC, no partial states) and regenerates the rolling slot window so the change is live for customers immediately. Idempotent (full-set replace).

Request body

store_idstring · uuidrequired

Store whose windows to replace (also authorises the merchant).

windowsarray of objectrequired

The FULL new window set, replaces the existing set atomically.

8 child fields
day_of_weekinteger, nullableoptional
specific_datestring, nullableoptional
start_timestringrequired
end_timestringrequired
slot_minutesinteger, nullableoptional
orders_per_slotinteger, nullableoptional
sort_orderintegeroptional
recurrence_untilstring, nullableoptional

Response, 200

windowsarray of objectrequired

The saved window set.

9 child fields
idstringoptional

Row id (present on read).

day_of_weeknumber, nullablerequired

0-6 (0=Sun) for a recurring weekly window; null for a one-off date window.

specific_datestring, nullablerequired

YYYY-MM-DD for a one-off date window; null for recurring.

start_timestringrequired

HH:MM.

end_timestringrequired

HH:MM.

slot_minutesnumber, nullablerequired

Per-window slot length; null → store default.

orders_per_slotnumber, nullablerequired

Per-window max orders per slot; null → store default.

sort_ordernumberrequired
recurrence_untilstring, nullableoptional

Recurring windows only: last date (YYYY-MM-DD); null/absent = forever.

slotsnumberrequired

Number of rolling slots regenerated so the change is live immediately.

curl -X PUT "https://www.membber.com/api/v1/collection-windows" \
  -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",
    "windows": [
      {
        "start_time": "<start_time>",
        "end_time": "<end_time>"
      }
    ]
  }'
Response, 200
{
  "windows": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "day_of_week": 1,
      "specific_date": "<specific_date>",
      "start_time": "<start_time>",
      "end_time": "<end_time>",
      "slot_minutes": 1,
      "orders_per_slot": 1,
      "sort_order": 1,
      "recurrence_until": "<recurrence_until>"
    }
  ],
  "slots": 1
}
WhatsApp
Book a Call
Start Free