Saltar al contenido

Financial reports

Financial reports

Generate P&L, cash flow, EBITDA and other reports for any date range. Reports are persisted so you can list, retrieve and delete them.

List financial reports

GET /v1/financial_reports Scope: reports:read

Previously-generated reports, newest first.

Query parameters

typestringOptional

Filter by report type.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom

Request

curl https://api.tablezio.com/v1/financial_reports -H 'X-API-Key: tbz_…'

Response

application/json
{ "object": "list", "data": [ /* financial_report */ ], "has_more": false, "next_cursor": null, "previous_cursor": null, "url": "/v1/financial_reports" }

Retrieve a financial report

GET /v1/financial_reports/{id} Scope: reports:read

Fetch a single report by id.

Path parameters

idstringRequired

Report ID.

Request

curl https://api.tablezio.com/v1/financial_reports/evt_… -H 'X-API-Key: tbz_…'

Response

application/json
{
  "id": "evt_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "financial_report",
  "created": 1716730000,
  "name": "May 2026 P&L",
  "type": "profit_loss",
  "period": "monthly",
  "start_date": 1714521600,
  "end_date": 1717113600,
  "status": "ready",
  "generated_at": 1716730000,
  "summary": {
    "totalRevenue": 8_240_000,
    "totalExpenses": 5_120_000,
    "netIncome": 3_120_000,
    "foodCostPercentage": 0.28,
    "laborCostPercentage": 0.31,
    "primeCostPercentage": 0.59,
    "ebitda": 3_640_000
  },
  "data": null
}

Generate a financial report

POST /v1/financial_reports Scope: reports:write

Asynchronously generates a report for the requested period. The first response is status: ready with a summary; the full data field arrives on the same object once aggregation completes.

Body parameters

namestringRequired

Friendly display name.

typestringRequired

Report kind.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom
periodstringOptional

Granularity hint.

dailyweeklymonthlyquarterlyyearly
start_datestring (ISO 8601)Required

Period start.

end_datestring (ISO 8601)Required

Period end.

Request

curl -X POST https://api.tablezio.com/v1/financial_reports \
  -H 'X-API-Key: tbz_…' -H 'Content-Type: application/json' \
  -d '{ "name": "May 2026 P&L", "type": "profit_loss", "period": "monthly", "start_date": "2026-05-01", "end_date": "2026-05-31" }'

Response

application/json
{
  "id": "evt_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "financial_report",
  "created": 1716730000,
  "name": "May 2026 P&L",
  "type": "profit_loss",
  "period": "monthly",
  "start_date": 1714521600,
  "end_date": 1717113600,
  "status": "ready",
  "generated_at": 1716730000,
  "summary": {
    "totalRevenue": 8_240_000,
    "totalExpenses": 5_120_000,
    "netIncome": 3_120_000,
    "foodCostPercentage": 0.28,
    "laborCostPercentage": 0.31,
    "primeCostPercentage": 0.59,
    "ebitda": 3_640_000
  },
  "data": null
}

Delete a financial report

DELETE /v1/financial_reports/{id} Scope: reports:write

Permanently removes a report.

Path parameters

idstringRequired

Report ID.

Request

curl -X DELETE https://api.tablezio.com/v1/financial_reports/evt_… -H 'X-API-Key: tbz_…'

Response

application/json
{ "object": "financial_report", "id": "evt_…", "deleted": true }