Calculate a report without storing it
post
https://api.flactrum.com/v1/reports/preview
Same figures as generating, but nothing is written. Dashboards use this — storing a report on every screen refresh would fill the list with rubbish within minutes.
| Required scope | reports.read |
| Success status | 200 |
Request body
| Field | Type | Description |
|---|---|---|
| category * | string | — |
| period_type * | string | Covers the previous complete period: daily means yesterday. |
| branch_id | string|null | — |
| send_by_email | boolean | Also e-mail the file to the signed-in user (management app only; an API key has no mailbox). |
| format | string | File format of the e-mailed report. Defaults to xlsx. |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/reports/preview' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"category": "product",
"period_type": "weekly"
}'
HTTP 200 · application/json
{
"data": {
"rows": [],
"totals": {
"revenue": 0,
"cost": 0
}
},
"meta": {
"category": "product",
"period_type": "weekly",
"period_start": "2026-09-20",
"period_end": "2026-09-27"
}
}