2 operations. Every schema and example on this page is generated from the platform contract.
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.
1 (the default) is the newest 50.
Only the changes to this one thing: a drop, an order, or any other target id.
First day, on the shop's calendar (YYYY-MM-DD), or `all` for no first day. Left out: 30 days before `to`.
Last day, on the shop's calendar (YYYY-MM-DD). Left out: today.
Only this kind of change.
posthoursitemsshoppaymentsrefundsstaffplanmessagesloyaltyinstagramdropsbookingscustomershqaiOne row's id. The answer then holds no list, only `opened`: that row in full, with the person's email.
IANA zone the times are shown in.
The first day read (YYYY-MM-DD), or null for no first day.
The last day read (YYYY-MM-DD).
Newest first, 50 at most. No email address anywhere in it. Empty when `open` was asked.
source:row id, unique across both audit tables.
When it happened (ISO). Show it in the shop timezone.
A plain title made from the action, e.g. "Drop cancelled".
person: someone signed in. key: an agent key. system: a job, or nobody recorded.
personkeysystemThe person's name, the key's name (else AI), or System. Never an email address.
Owner, or their role at the shop, when known.
The person signed in with a Membber address (decided on the server; the address is not sent).
An AI tool or an agent key made the change.
The door the change came through, when the row carries one: AI (ChatGPT), Staff card, a named job.
The thing changed (a drop, an order...), or null for the shop itself.
Only the fields whose value changed. On a list a field holding a person's details reads [hidden] on both sides.
There is another page of older changes.
Only with kind `hq`: there were too many candidate accounts to check them all, so the list may miss a Membber person.
Only when `open` was asked, and the row is one of this shop.
The row in full: addresses inside its values and reason are shown.
source:row id, unique across both audit tables.
When it happened (ISO). Show it in the shop timezone.
A plain title made from the action, e.g. "Drop cancelled".
person: someone signed in. key: an agent key. system: a job, or nobody recorded.
personkeysystemThe person's name, the key's name (else AI), or System. Never an email address.
Owner, or their role at the shop, when known.
The person signed in with a Membber address (decided on the server; the address is not sent).
An AI tool or an agent key made the change.
The door the change came through, when the row carries one: AI (ChatGPT), Staff card, a named job.
The thing changed (a drop, an order...), or null for the shop itself.
Only the fields whose value changed. On a list a field holding a person's details reads [hidden] on both sides.
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"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.GET("/api/v1/admin-shop-changes/{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.adminShopChanges(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f")
).ok.body.json
print(response){
"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"
}
}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.
Only the changes to this one thing: a drop, an order, or any other target id.
First day, on the shop's calendar (YYYY-MM-DD), or `all` for no first day. Left out: 30 days before `to`.
Last day, on the shop's calendar (YYYY-MM-DD). Left out: today.
Only this kind of change.
posthoursitemsshoppaymentsrefundsstaffplanmessagesloyaltyinstagramdropsbookingscustomershqaiThe shop and the days asked for.
UTF-8 CSV text with a BOM and a header, CRLF line endings. One row per change, newest first.
The range held more rows than the file takes (5000): the file was cut off, ask for fewer days.
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"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/admin-shop-changes/{storeId}/export", {
params: { path: { storeId: "8fb04ddc-0000-4000-8000-d0c50000008f" } },
body: {
target: "<target>",
from: "<from>",
to: "<to>",
kind: "post"
},
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.exportAdminShopChanges(
path: .init(storeId: "8fb04ddc-0000-4000-8000-d0c50000008f"),
body: .json(.init(
target: "<target>",
from: "<from>",
to: "<to>",
kind: .post
))
).ok.body.json
print(response){
"export": {
"filename": "<filename>",
"csv": "<csv>",
"row_count": 1,
"truncated": true,
"team_incomplete": true
}
}