MobiariDocs
Admin APICustomers

List customers

GET
/stores/{store_id}/customers

Newest first (created_at, then id). Paged by keyset: follow next_cursor, or pass offset (with include_total=true) for a page-number table. Each row carries its lifecycle stage; acquisition is only on the customer record.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid

Query Parameters

search?string

Matches name (first, last or full), e-mail, phone, company or document. Digits in the query also match phone and document ignoring punctuation, so 11 98765-4321 finds +5511987654321.

tag?string

Only customers with this tag.

lifecycle?string

Where a customer is in their relationship with the store, derived from their paid orders:

StageMeaning
vipSpent at least the store's 90th percentile.
newNo paid order yet.
activeLast order within 60 days.
at_riskLast order 60 to 180 days ago.
dormantLast order more than 180 days ago.
Value in"new" | "active" | "at_risk" | "dormant" | "vip"
limit?integer

Page size, 1 to 200. Defaults to 50.

Formatint64
Range1 <= value <= 200
cursor?string

next_cursor from the previous page. Omit for the first page.

offset?integer

Rows to skip, for UIs that jump to a page number. Ignored when cursor is set. Prefer cursor for walking a whole list.

Formatint64
Range0 <= value
include_total?boolean

Also return total, the count of all matching rows. Costs an extra query; leave off when you only walk pages.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers?limit=50"
{
  "data": [
    {
      "acquisition": {},
      "company": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "date_of_birth": "2019-08-24",
      "document": "string",
      "email": "string",
      "email_verified": true,
      "first_name": "string",
      "gender": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "last_login_at": "2019-08-24T14:15:22Z",
      "last_name": "string",
      "last_order_at": "2019-08-24T14:15:22Z",
      "lifecycle": "new",
      "marketing_opt_in": true,
      "notes": "string",
      "phone": "string",
      "phone_verified": true,
      "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
      "tags": [
        "string"
      ],
      "total_orders": 0,
      "total_spent": 0,
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "has_more": true,
  "next_cursor": "string",
  "total": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}