Skip to content
Get API key

API reference

Daily report API

One business day, 00:00 to 24:00 in the business’s own timezone. It counts sales the way the app’s reports do: completed, and not complimentary.

Retrieve the daily report

GET/api-v1-reports-daily

Totals, payment-method split, the hourly curve and the top ten products for one day.

Query parameters

NameTypeRequiredDescription
datestringOptionalThe day, YYYY-MM-DD.Default: today in the business’s timezone.
location_iduuidOptionalOnly this outlet. Without it, every outlet the key may read.

Response fields (200)

NameTypeDescription
totalsobjectorders, gross, refunds, net, tax, service_charge, payment_fees and avg_ticket (gross ÷ orders, rounded).
payment_methods[]arraymethod, orders, amount; largest amount first.
by_hour[]arrayhour (0-23, local), orders, net.
top_products[]arrayUp to ten: product_id, name, quantity, amount; most sold first.

Errors

Every error answers { "error": { "code", "message", "request_id" } }. Branch on code; see Errors for retrying.

HTTPCodeWhen
400validation_failedA query parameter did not parse; the message names it. Also returned when from/to span more than 400 days.
401invalid_keyThe Authorization header is missing, malformed, or the key is revoked or inactive.
402payment_requiredThe business’s plan does not include API access (Sansflow Premium). The key itself is fine.
403insufficient_scopeThe key does not carry the scope this endpoint needs, or it is pinned to a different outlet.
429rate_limitedOver the key’s per-minute limit (60 for sf_test_, 300 for sf_live_). Wait the seconds in Retry-After.
500internal_errorSomething failed on our side. Quote the request_id when you report it.
Request
curl -G "https://ewpuclvmnygoddunkyrb.supabase.co/functions/v1/api-v1-reports-daily" \
  -H "Authorization: Bearer $SANSFLOW_API_KEY" \
  --data-urlencode "date=2026-11-07"
Response200 OK
{
  "data": {
    "date": "2026-11-07",
    "timezone": "Asia/Jakarta",
    "location_id": null,
    "totals": {
      "orders": 80,
      "gross": 16000000,
      "refunds": 0,
      "net": 16000000,
      "tax": 0,
      "service_charge": 0,
      "payment_fees": 0,
      "avg_ticket": 200000
    },
    "payment_methods": [
      {
        "method": "qris",
        "orders": 52,
        "amount": 10400000
      },
      {
        "method": "cash",
        "orders": 28,
        "amount": 5600000
      }
    ],
    "by_hour": [
      {
        "hour": 19,
        "orders": 20,
        "net": 4100000
      }
    ],
    "top_products": [
      {
        "product_id": "f1b3d5a7-9c2e-4a6b-8d14-7e3c5a9b1d68",
        "name": "Kopi Susu",
        "quantity": 75,
        "amount": 1875000
      }
    ]
  },
  "request_id": "5d0c7e2a-91f4-4b3e-a8c6-0f2e4b6d8a1c"
}

Example values. Run replays this response here; nothing is sent.

Base URL, keys and conventions: API reference overview.

Stuck? Quote the request_id from the response and write toSansflow support.Checked against API v1 on .