Skip to content
v0.3

read.internal.sales_metrics

The admin dashboard’s sales aggregate for a period (7d/30d/90d, optionally one store): revenue, orders, average ticket and new customers for the window AND for the previous one, the daily series behind them, the per-store breakdown with its own series, the order count by status, and the two live actionables (unpaid for over 48h; ready for pickup and not collected). Days are cut in the instance timezone; money is cents. Computed in SQL — never a scan in the consumer.

  • Surface: GET /v1/read/internal/sales_metrics · MCP tool read.internal.sales_metrics
  • Auth:Internal read (operator) — a tenant credential is REQUIRED; requires ANY ONE of order.read, order.write. The tenant is resolved from the CALLER’s identity, never from store. Personal fields come back MASKED for an actor without pii.read (the shape is unchanged).
{
"properties": {
"period": {
"enum": [
"7d",
"30d",
"90d"
],
"type": "string"
},
"store_id": {
"minLength": 1,
"type": "string"
}
},
"required": [
"period"
],
"type": "object"
}

Open (unknown) — this capability does not declare an output schema.

validation_failed (400) · not_found (404) · unauthorized (401) · forbidden (403)