Aller au contenu
tablezio

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 Portée: reports:read

Previously-generated reports, newest first.

Paramètres de requête

typestringFacultatif

Filter by report type.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom

Requête

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

Réponse

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} Portée: reports:read

Fetch a single report by id.

Paramètres de chemin

idstringObligatoire

Report ID.

Requête

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

Réponse

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": { "sales": { "grossSales": 9_064_000, "vat": 824_000, "netSales": 8_240_000, "byRate": [ /* … */ ] }, "refunds": { /* … */ }, "payments": { /* … */ }, "cogs": { "amount": 2_307_200, "coveragePct": 94.5 }, "labor": { "status": "ok", "amount": 2_554_400 }, "daily": [ /* … */ ], "previous": { /* summary of the prior period */ }, "changes": { /* % vs prior period */ } }
}

Generate a financial report

POST /v1/financial_reports Portée: reports:write

Computes a P&L for the requested calendar days (in the venue time zone, both dates inclusive, max 366 days) from real data — completed orders, payments, refunds, recipe costs and clocked hours — and stores it. The response is status: ready with the summary (amounts in cents; percentages are fractions of net revenue after refunds) and the full breakdown in data. Sales reconcile with the analytics revenue report for the same period.

Paramètres du corps

namestringObligatoire

Friendly display name.

typestringObligatoire

Report kind.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom
periodstringFacultatif

Granularity hint.

dailyweeklymonthlyquarterlyyearly
start_datestring (ISO 8601)Obligatoire

First day of the period (YYYY-MM-DD).

end_datestring (ISO 8601)Obligatoire

Last day of the period, inclusive (YYYY-MM-DD).

Requête

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" }'

Réponse

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": { "sales": { "grossSales": 9_064_000, "vat": 824_000, "netSales": 8_240_000, "byRate": [ /* … */ ] }, "refunds": { /* … */ }, "payments": { /* … */ }, "cogs": { "amount": 2_307_200, "coveragePct": 94.5 }, "labor": { "status": "ok", "amount": 2_554_400 }, "daily": [ /* … */ ], "previous": { /* summary of the prior period */ }, "changes": { /* % vs prior period */ } }
}

Delete a financial report

DELETE /v1/financial_reports/{id} Portée: reports:write

Permanently removes a report.

Paramètres de chemin

idstringObligatoire

Report ID.

Requête

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

Réponse

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