MobiariDocs
Admin APIAnalytics

Get dashboard numbers

GET
/stores/{store_id}/dashboard/stats

Products, customers, pending orders and paid revenue for the period, each with its change against the previous period, plus today's paid revenue and orders, recent activity, daily storefront traffic and daily revenue and order series.

Days are computed in the store's time zone (returned as timezone); see DashboardStats for the exact boundaries and what each series counts.

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

range?string

KPIs, deltas and the charts all follow this window, in the store's time zone. Defaults to month.

Value in"7d" | "30d" | "90d" | "month"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/dashboard/stats"
{
  "active_customers": 0,
  "active_customers_change_pct": 0.1,
  "orders_series": [
    {
      "date": "2019-08-24",
      "value": 0
    }
  ],
  "orders_today": 0,
  "pending_orders": 0,
  "pending_orders_change_pct": 0.1,
  "period_start": "2019-08-24T14:15:22Z",
  "recent_activity": [
    {
      "action": "string",
      "activity_type": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
      "kind": "order_created",
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "params": {
        "customer_name": "string",
        "order_number": "string",
        "product_title": "string"
      },
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1"
    }
  ],
  "revenue_cents": 0,
  "revenue_change_pct": 0.1,
  "revenue_currency": "BRL",
  "revenue_series": [
    {
      "date": "2019-08-24",
      "value": 0
    }
  ],
  "revenue_this_month_cents": 0,
  "revenue_this_month_change_pct": 0.1,
  "revenue_today_cents": 0,
  "support_open_count": 0,
  "timezone": "America/Sao_Paulo",
  "today": "2019-08-24",
  "total_products": 0,
  "total_products_change_pct": 0.1,
  "visitors": [
    {
      "date": "2019-08-24",
      "sessions": 0,
      "visitors": 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"
}