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
/api-v1-reports-dailyTotals, payment-method split, the hourly curve and the top ten products for one day.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string | Optional | The day, YYYY-MM-DD.Default: today in the business’s timezone. |
location_id | uuid | Optional | Only this outlet. Without it, every outlet the key may read. |
Response fields (200)
| Name | Type | Description |
|---|---|---|
totals | object | orders, gross, refunds, net, tax, service_charge, payment_fees and avg_ticket (gross ÷ orders, rounded). |
payment_methods[] | array | method, orders, amount; largest amount first. |
by_hour[] | array | hour (0-23, local), orders, net. |
top_products[] | array | Up 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.
| HTTP | Code | When |
|---|---|---|
| 400 | validation_failed | A query parameter did not parse; the message names it. Also returned when from/to span more than 400 days. |
| 401 | invalid_key | The Authorization header is missing, malformed, or the key is revoked or inactive. |
| 402 | payment_required | The business’s plan does not include API access (Sansflow Premium). The key itself is fine. |
| 403 | insufficient_scope | The key does not carry the scope this endpoint needs, or it is pinned to a different outlet. |
| 429 | rate_limited | Over the key’s per-minute limit (60 for sf_test_, 300 for sf_live_). Wait the seconds in Retry-After. |
| 500 | internal_error | Something failed on our side. Quote the request_id when you report it. |
curl -G "https://ewpuclvmnygoddunkyrb.supabase.co/functions/v1/api-v1-reports-daily" \
-H "Authorization: Bearer $SANSFLOW_API_KEY" \
--data-urlencode "date=2026-11-07"const url = new URL("https://ewpuclvmnygoddunkyrb.supabase.co/functions/v1/api-v1-reports-daily");
url.search = new URLSearchParams({
"date": "2026-11-07"
}).toString();
const res = await fetch(
url,
{
headers: {
Authorization: `Bearer ${process.env.SANSFLOW_API_KEY}`,
},
},
);
const json = await res.json();
if (!res.ok) throw new Error(`${json.error.code} (${json.error.request_id})`);
console.log(json);import os
import requests
res = requests.get(
"https://ewpuclvmnygoddunkyrb.supabase.co/functions/v1/api-v1-reports-daily",
headers={
"Authorization": f"Bearer {os.environ['SANSFLOW_API_KEY']}",
},
params={
"date": "2026-11-07",
},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']} ({data['error']['request_id']})")
print(data)GET /api-v1-reports-daily
{
"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 .