Skip to content
StraventaDocs

Get POS HQ cross-outlet dashboard

FW-6 HQ dashboard. Returns one snapshot per in-scope outlet ranked by today's net sales (`sales_total_cents` descending). Each outlet carries today's order count, open / closed shift counts, payment-mix (Z-report UNION source — card / qris from `pos_payment_intents`), a `low_stock_count` (`pos_stock_levels.quantity <= 5`, the OwnerSnapshot threshold) and an `order_exception_count` — a per-outlet, today-scoped, order-level metric counting voided OR discounted orders. The snapshot window is "today" (mirrors the single-store owner snapshot); there is no date range and no pagination (outlet cardinality is small). Per-branch isolation is enforced at the DATA layer identically to the consolidated report: a store-scoped caller only sees their own outlets, and a scoped caller requesting only out-of-scope outlets gets an empty array (200, not 403).

GET
/api/pos/v1/reports/hq-dashboard

FW-6 HQ dashboard. Returns one snapshot per in-scope outlet ranked by today's net sales (sales_total_cents descending). Each outlet carries today's order count, open / closed shift counts, payment-mix (Z-report UNION source — card / qris from pos_payment_intents), a low_stock_count (pos_stock_levels.quantity <= 5, the OwnerSnapshot threshold) and an order_exception_count — a per-outlet, today-scoped, order-level metric counting voided OR discounted orders. The snapshot window is "today" (mirrors the single-store owner snapshot); there is no date range and no pagination (outlet cardinality is small).

Per-branch isolation is enforced at the DATA layer identically to the consolidated report: a store-scoped caller only sees their own outlets, and a scoped caller requesting only out-of-scope outlets gets an empty array (200, not 403).

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

store_ids?array<>

Optional repeated or comma-joined outlet UUIDs; intersected with the caller's JWT store scopes.

Response Body

application/json

curl -X GET "https://example.com/api/pos/v1/reports/hq-dashboard"
{
  "outlets": [
    {
      "store_id": "0c3f4d9f-7b8a-7c2d-9a2d-1f8b92f6d301",
      "store_code": "JKT-01",
      "store_name": "Cabang Jakarta Pusat",
      "sales_total_cents": 89750000,
      "order_count": 412,
      "open_shift_count": 2,
      "closed_shift_count": 1,
      "low_stock_count": 7,
      "order_exception_count": 3,
      "cash_total_cents": 40000000,
      "card_total_cents": 30000000,
      "qris_total_cents": 19750000
    }
  ],
  "outlet_count": 1
}
Empty
Empty
Empty

Was this page helpful?