Skip to content

FISCALISTO / API / REFERENCE

Get the cash flow · Cash flow

Open in ChatGPTOpen in ClaudeOpen in Cursor
GET
/v1/cash_forecast

The issuer's next 13 weeks, like «Flujo de efectivo» in the app: what it's owed, with how long each customer usually takes to pay; what it owes suppliers; payroll; the monthly tax returns; the recurring invoices and its planned movements, from the balance you gave. It brings alerts with what you can do, and with the parameters, a scenario (not saved). An estimate: nothing changes on its own.

Authorization

bearerAuth
headerAuthorizationBearer <key>

Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.

Query parameters

issuer?string

The issuer (iss_…). It can be left out if the key or the account has only one.

customers_pay_days_later?integer

Scenario: your customers pay you these many days later (0 to 120).

Range0 <= value <= 120
pay_suppliers_days_later?integer

Scenario: you pay your suppliers these many days later (0 to 120).

Range0 <= value <= 120
include_doubtful?boolean

true counts what is more than 90 days overdue (by default, no).

include_recurring?boolean

false leaves out the recurring invoices not issued yet.

recurring_sales_change?integer

Scenario: percent by which your recurring ones change (−100 to 100).

Range-100 <= value <= 100

Response body

OK.

application/json
  1. response

The cash flow for the next 13 weeks: what you are owed (with how long each customer usually takes), what you owe suppliers, payroll, tax returns, recurring invoices and your planned movements, from the balance you gave. An estimate: it changes nothing.

object*string

Always cash_forecast.

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

issuer*string

The issuer (iss_…).

today*string

Today in Mexico City (YYYY-MM-DD): the start.

end*string

The last day of week 13.

currency*string

Everything in pesos: anything in another currency, at its exchange rate.

starting_balance*|

Today's balance you gave; null if you haven't given it (the forecast starts from 0).

minimum_balance*number

The least you want to have; each week below it carries a warning. 0 if you didn't give it.

suggested_starting_balance*|

The balance of your latest statements in Conciliación (60 days), only as a suggestion; null without them.

scenario*

The scenario it was calculated with: the one in the query parameters.

totals*

The 13 weeks together.

weeks*array<>

The 13 weeks, in order.

lines*array<>

Each thing that comes in or goes out, from which the weeks are added up.

warnings*array<>

Warnings with what you can do; you decide.

planned_items*array<>

Your planned movements.

notes*array<string>

What couldn't be estimated and why.

Errors

  • The issuer is archived and no longer stamps. Its documents can still be read and canceled.

  • The account has several issuers and the request doesn't say which: send issuer (iss_…).

  • The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

  • Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.

  • That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.

  • This key can't use that issuer.

  • There is no such issuer in the account (or it belongs to the other mode).

Plus those of any call (key, fields, limits): Errors. They all carry code, message and, when it's about a field, param.

curl -X GET 'https://api.fiscalisto.com/v1/cash_forecast' \  -H 'Authorization: Bearer fk_test_…'
{  "object": "cash_forecast",  "livemode": false,  "issuer": "iss_OufpKqnrvx9p",  "today": "2026-11-16",  "end": "2027-02-14",  "currency": "MXN",  "starting_balance": {    "amount": 185000,    "date": "2026-11-16"  },  "minimum_balance": 50000,  "suggested_starting_balance": {    "amount": 183420.5,    "date": "2026-11-14"  },  "scenario": {    "customers_pay_days_later": 0,    "pay_suppliers_days_later": 0,    "include_doubtful": false,    "include_recurring": true,    "recurring_sales_change": 0  },  "totals": {    "inflows": 612400,    "outflows": 655900,    "ending_balance": 141500,    "lowest_balance": 38200,    "lowest_week": 3,    "weeks_below_minimum": 1,    "doubtful_left_out": 12760  },  "weeks": [    {      "week": 1,      "start": "2026-11-16",      "end": "2026-11-22",      "starting_balance": 185000,      "inflows": 34800,      "outflows": 0,      "ending_balance": 219800,      "by_type": {        "receivable": 34800      }    },    {      "week": 2,      "start": "2026-11-23",      "end": "2026-11-29",      "starting_balance": 219800,      "inflows": 0,      "outflows": 121400,      "ending_balance": 98400,      "by_type": {        "payable": 46400,        "payroll": 75000      }    }  ],  "lines": [    {      "line": "cobro:ICV060329BY0:2026-10-15:ppd",      "type": "receivable",      "direction": "inflow",      "date": "2026-11-20",      "estimated_date": "2026-11-20",      "week": 1,      "amount": 34800,      "estimated_amount": 34800,      "description": "INMOBILIARIA CVA",      "tax_id": "ICV060329BY0",      "invoices": 2,      "due_date": "2026-11-14",      "days_overdue": null,      "basis": "Suele pagar en 36 días; la factura es del 15 de octubre.",      "confidence": "medium",      "left_out": null,      "adjusted": false,      "planned_item": null    }  ],  "warnings": [    {      "type": "shortfall",      "severity": "warning",      "title": "La semana 3 cerraría con $38,200, debajo de su mínimo de $50,000",      "detail": "Le faltarían $11,800. Puede cobrar antes lo atrasado o mover un pago a proveedor.",      "week": 3,      "shortfall": 11800    }  ],  "planned_items": [    {      "id": "cfi_OufpKqnrvx9p7Hq2",      "object": "cash_forecast_item",      "livemode": false,      "issuer": "iss_OufpKqnrvx9p",      "description": "Renta de la bodega",      "direction": "outflow",      "amount": 28000,      "date": "2026-12-01",      "frequency": "monthly",      "until": null    }  ],  "notes": []}

Was this page helpful?