メインコンテンツへ移動
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 スコープ: reports:read

Previously-generated reports, newest first.

クエリパラメータ

typestring任意

Filter by report type.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom

リクエスト

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

レスポンス

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} スコープ: reports:read

Fetch a single report by id.

パスパラメータ

idstring必須

Report ID.

リクエスト

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

レスポンス

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 スコープ: 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.

ボディパラメータ

namestring必須

Friendly display name.

typestring必須

Report kind.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom
periodstring任意

Granularity hint.

dailyweeklymonthlyquarterlyyearly
start_datestring (ISO 8601)必須

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

end_datestring (ISO 8601)必須

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

リクエスト

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

レスポンス

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} スコープ: reports:write

Permanently removes a report.

パスパラメータ

idstring必須

Report ID.

リクエスト

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

レスポンス

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