API referenceAdmin shop changes

Admin shop changes

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

Who changed what in one shop.

Internal-admin. Every recorded change to one shop, newest first, 50 a page: when, who (a person, an agent key or the system), a plain title, whether an AI did it, the thing changed, and before and after for the fields that changed. Within a range of days on the shop calendar (the last 30 unless asked), optionally one kind of change, optionally only the changes to one drop or order. A list holds no email address and hides a person's details; `open` returns one row in full and is written to the admin audit log. Otherwise read-only.

Parameters

storeIdstringpathrequired
pageintegerqueryoptional

1 (the default) is the newest 50.

targetstringqueryoptional

Only the changes to this one thing: a drop, an order, or any other target id.

fromanyqueryoptional

First day, on the shop's calendar (YYYY-MM-DD), or `all` for no first day. Left out: 30 days before `to`.

tostringqueryoptional

Last day, on the shop's calendar (YYYY-MM-DD). Left out: today.

kindenumqueryoptional

Only this kind of change.

posthoursitemsshoppaymentsrefundsstaffplanmessagesloyaltyinstagramdropsbookingscustomershqai
openstringqueryoptional

One row's id. The answer then holds no list, only `opened`: that row in full, with the person's email.

Response, 200

storeobjectrequired
4 child fields
idstringrequired
namestring, nullablerequired
handlestring, nullablerequired
timezonestringrequired

IANA zone the times are shown in.

fromstring, nullablerequired

The first day read (YYYY-MM-DD), or null for no first day.

tostringrequired

The last day read (YYYY-MM-DD).

changesarray of objectrequired

Newest first, 50 at most. No email address anywhere in it. Empty when `open` was asked.

9 child fields
idstringrequired

source:row id, unique across both audit tables.

atstringrequired

When it happened (ISO). Show it in the shop timezone.

titlestringrequired

A plain title made from the action, e.g. "Drop cancelled".

whoobjectrequired
4 child fields
kindenumrequired

person: someone signed in. key: an agent key. system: a job, or nobody recorded.

personkeysystem
labelstringrequired

The person's name, the key's name (else AI), or System. Never an email address.

rolestring, nullablerequired

Owner, or their role at the shop, when known.

membber_teambooleanrequired

The person signed in with a Membber address (decided on the server; the address is not sent).

via_aibooleanrequired

An AI tool or an agent key made the change.

doorstring, nullablerequired

The door the change came through, when the row carries one: AI (ChatGPT), Staff card, a named job.

targetobjectrequired

The thing changed (a drop, an order...), or null for the shop itself.

3 child fields
typestringrequired
labelstringrequired
idstringrequired
reasonstring, nullablerequired
changesarray of objectrequired

Only the fields whose value changed. On a list a field holding a person's details reads [hidden] on both sides.

3 child fields
fieldstringrequired
beforestring, nullablerequired
afterstring, nullablerequired
pageintegerrequired
has_olderbooleanrequired

There is another page of older changes.

team_incompletebooleanrequired

Only with kind `hq`: there were too many candidate accounts to check them all, so the list may miss a Membber person.

openedobjectrequired

Only when `open` was asked, and the row is one of this shop.

2 child fields
changeobjectrequired

The row in full: addresses inside its values and reason are shown.

9 child fields
idstringrequired

source:row id, unique across both audit tables.

atstringrequired

When it happened (ISO). Show it in the shop timezone.

titlestringrequired

A plain title made from the action, e.g. "Drop cancelled".

whoobjectrequired
4 child fields
kindenumrequired

person: someone signed in. key: an agent key. system: a job, or nobody recorded.

personkeysystem
labelstringrequired

The person's name, the key's name (else AI), or System. Never an email address.

rolestring, nullablerequired

Owner, or their role at the shop, when known.

membber_teambooleanrequired

The person signed in with a Membber address (decided on the server; the address is not sent).

via_aibooleanrequired

An AI tool or an agent key made the change.

doorstring, nullablerequired

The door the change came through, when the row carries one: AI (ChatGPT), Staff card, a named job.

targetobjectrequired

The thing changed (a drop, an order...), or null for the shop itself.

3 child fields
typestringrequired
labelstringrequired
idstringrequired
reasonstring, nullablerequired
changesarray of objectrequired

Only the fields whose value changed. On a list a field holding a person's details reads [hidden] on both sides.

3 child fields
fieldstringrequired
beforestring, nullablerequired
afterstring, nullablerequired
emailstring, nullablerequired

The person's email, or null for a key, a job or a person with none.

curl -G "https://www.membber.com/api/v1/admin-shop-changes/8fb04ddc-0000-4000-8000-d0c50000008f" \
  -H "Authorization: Bearer $MEMBBER_TOKEN"
Response, 200
{
  "store": {
    "id": "00000d1b-0000-4000-8000-d0c500000000",
    "name": "Example name",
    "handle": "<handle>",
    "timezone": "Europe/London"
  },
  "from": "<from>",
  "to": "<to>",
  "changes": [
    {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "at": "<at>",
      "title": "Morning class",
      "who": {
        "kind": "person",
        "label": "<label>",
        "role": "<role>",
        "membber_team": true
      },
      "via_ai": true,
      "door": "<door>",
      "target": {
        "type": "<type>",
        "label": "<label>",
        "id": "00000d1b-0000-4000-8000-d0c500000000"
      },
      "reason": "Added at the front desk",
      "changes": [
        {
          "field": "<field>",
          "before": "<before>",
          "after": "<after>"
        }
      ]
    }
  ],
  "page": 0,
  "has_older": true,
  "team_incomplete": true,
  "opened": {
    "change": {
      "id": "00000d1b-0000-4000-8000-d0c500000000",
      "at": "<at>",
      "title": "Morning class",
      "who": {
        "kind": "person",
        "label": "<label>",
        "role": "<role>",
        "membber_team": true
      },
      "via_ai": true,
      "door": "<door>",
      "target": {
        "type": "<type>",
        "label": "<label>",
        "id": "00000d1b-0000-4000-8000-d0c500000000"
      },
      "reason": "Added at the front desk",
      "changes": [
        {
          "field": "<field>",
          "before": "<before>",
          "after": "<after>"
        }
      ]
    },
    "email": "alex@example.com"
  }
}

One shop's changes as a CSV file.

Internal-admin. The rows the page lists for one shop, with the same range, kind and thing asked for, as one CSV file for a dispute or a compliance request: when (UTC and shop time), who, role, door, what, the thing changed, the reason, before and after. Exactly what the list shows: no email address, no buyer's details, secret-looking values masked. Each export is written to the admin audit log first, with who asked and how many rows, never the rows; if that cannot be written there is no file.

Parameters

storeIdstringpathrequired

Request body

targetstringoptional

Only the changes to this one thing: a drop, an order, or any other target id.

fromanyoptional

First day, on the shop's calendar (YYYY-MM-DD), or `all` for no first day. Left out: 30 days before `to`.

tostringoptional

Last day, on the shop's calendar (YYYY-MM-DD). Left out: today.

kindenumoptional

Only this kind of change.

posthoursitemsshoppaymentsrefundsstaffplanmessagesloyaltyinstagramdropsbookingscustomershqai

Response, 200

exportobjectrequired
5 child fields
filenamestringrequired

The shop and the days asked for.

csvstringrequired

UTF-8 CSV text with a BOM and a header, CRLF line endings. One row per change, newest first.

row_countintegerrequired
truncatedbooleanrequired

The range held more rows than the file takes (5000): the file was cut off, ask for fewer days.

team_incompletebooleanrequired

Only with kind `hq`: there were too many candidate accounts to check them all, so the file may miss a Membber person.

curl -X POST "https://www.membber.com/api/v1/admin-shop-changes/8fb04ddc-0000-4000-8000-d0c50000008f/export" \
  -H "Authorization: Bearer $MEMBBER_TOKEN" \
  -H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
  -H "Content-Type: application/json" \
  -d '{
    "target": "<target>",
    "from": "<from>",
    "to": "<to>",
    "kind": "post"
  }'
Response, 200
{
  "export": {
    "filename": "<filename>",
    "csv": "<csv>",
    "row_count": 1,
    "truncated": true,
    "team_incomplete": true
  }
}
WhatsApp
Book a Call
Get Started
Admin shop changes API | Membber Developers