A read-only endpoint that returns a customer's order history and subscription snapshot for a single brand. It powers the DeskFlow support desk's purchase-history panel, but is a generic API any support tool, CRM, or dashboard can call. It can never write to your ledger and only ever returns the brand its key belongs to.
In MMF go to Settings → Integrations, add a Customer Lookup API (read-only) integration, and copy the generated read key. Give the key + endpoint URL to your tool. Disabling or deleting the integration revokes access immediately.
The token may also be passed as ?key=<read_token> or the X-MMF-Inbound-Token header. email is required and matched case-insensitively.
| Parameter | In | Required | Description |
|---|---|---|---|
| query | Yes | The customer's email address to look up. | |
| read_token | Authorization: Bearer (or ?key=) | Yes | The brand's read-only credential; resolves which brand's ledger to read (tenant isolation). |
| Field | Type | Description |
|---|---|---|
| string | The email that was looked up (echoed back). | |
| orders | array of Order | The customer's orders for this brand, newest first. Empty array if none. |
| subscription | Subscription | null | Current membership snapshot, or null if no subscriber record. |
| Field | Type | Description |
|---|---|---|
| order_number | string | Unique order reference. |
| total | number | Order total in the store currency (dollars). |
| date | string (ISO 8601) | When the order was created. |
| status | string | Billing status: paid, pending, void, or refunded. |
| rail | string | Checkout rail the sale came through: stripe or skool. |
| products | array of string | Product names in the order. |
| Field | Type | Description |
|---|---|---|
| status | string | active, cancelled, past_due, or none. |
| has_subscription | boolean | Whether the customer currently has an active subscription. |
| rail | string | Which rail the subscription bills on: stripe or skool. |
| band | string | null | Assessment band, if recorded (may be null). |
| started_at | string (ISO 8601) | null | When the subscription started. |
| HTTP | Body | Meaning |
|---|---|---|
| 401 | {"error":"missing_token","orders":[]} | No token supplied. |
| 403 | {"error":"invalid_token","orders":[]} | Token is wrong, inactive, or not a read credential. |
| 400 | {"error":"missing_email","orders":[]} | No email supplied. |
| 200 | {"orders":[],"subscription":null} | Valid request, but nothing found for that email. |
| 500 | {"error":"...","orders":[]} | Unexpected server error. |
For security and privacy the API never exposes: payment method / card details or any Stripe secret or customer id; billing or shipping addresses, phone numbers, or other PII beyond the queried email; internal notes, cost, or margin; test / sample records; and never any other customer's data — a key only ever reads its own brand's ledger. New fields are added to this contract only as a documented, reviewed change.
The contract above is stable. Point any tool — a CRM, an internal dashboard, or a Zapier "GET" step — at the endpoint with your brand's read token and you'll always get the same shape. Handle the error codes, and treatorders: [] / subscription: null as "no record found," not an error.
Read-only · per-brand isolated · cannot write to the ledger.