Saltar al contenido
tablezio

Informes financieros

Informes financieros

Genera P&L, flujo de caja, EBITDA y otros informes para cualquier rango de fechas. Los informes se persisten para que los puedas listar, recuperar y borrar.

List financial reports

GET /v1/financial_reports Permiso: reports:read

Previously-generated reports, newest first.

Parámetros de consulta

typestringOpcional

Filter by report type.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom

Solicitud

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

Respuesta

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} Permiso: reports:read

Fetch a single report by id.

Parámetros de ruta

idstringObligatorio

Report ID.

Solicitud

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

Respuesta

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 Permiso: 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.

Parámetros del cuerpo

namestringObligatorio

Friendly display name.

typestringObligatorio

Report kind.

profit_losscash_flowbalance_sheetebitdarevenue_analysisexpense_breakdownfood_costlabor_costprime_costcustom
periodstringOpcional

Granularity hint.

dailyweeklymonthlyquarterlyyearly
start_datestring (ISO 8601)Obligatorio

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

end_datestring (ISO 8601)Obligatorio

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

Solicitud

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

Respuesta

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} Permiso: reports:write

Permanently removes a report.

Parámetros de ruta

idstringObligatorio

Report ID.

Solicitud

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

Respuesta

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