# Get the cash flow statement

`GET https://api.fiscalisto.com/v1/accounting/cash_flow`

The cash flow statement (NIF B-2, indirect method) for the month or from January to the month: the profit, the depreciation and amortization added back, the change in working capital, and the investing and financing activities, up to the cash at close. Each account goes to its activity by its grouping code; difference is 0 when the trial balance balances. Like Estados financieros › Flujo de efectivo in the app.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `month` | query | yes | The month (YYYY-MM). |
| `period` | query |  | month (just the month) or year_to_date (from January to the month, the default). |
| `issuer` | query |  | The issuer (iss_…). It can be left out if the key or the account has only one. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const cashFlow = await fiscalisto.accounting.cashFlow({ month: "2026-10" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

cash_flow = fiscalisto.accounting.cash_flow({"month": "2026-10"})
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$cashFlow = $fiscalisto->accounting->cashFlow(['month' => '2026-10']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var cashFlow = await fiscalisto.Accounting.CashFlowAsync(new GetCashFlowParams { Month = "2026-10" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	cashFlow, err := client.Accounting.CashFlow(ctx, &fiscalisto.GetCashFlowParams{Month: "2026-10"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *cashFlow)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetCashFlowParams;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var cashFlow = fiscalisto.accounting().cashFlow(new GetCashFlowParams().setMonth("2026-10"));
System.out.println(cashFlow);
```

## Response 200

OK.

A `CashFlow` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"cash_flow"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer. |
| `month` | string | yes | The month (YYYY-MM). |
| `period` | `month`, `year_to_date` | yes | The month alone (month) or January to the month (year_to_date). |
| `net_income` | number | yes | The period's profit (or loss) before taxes. |
| `operating` | object | yes | Operating activities. |
| `operating.non_cash` | array of object | yes | What is added back because no cash went out: depreciation (171), impairment (172) and amortization (183). |
| `operating.non_cash[].grouping_code` | string | yes | The SAT grouping code (its first level, or 202.01 to 202.12). |
| `operating.non_cash[].name` | string | yes | Its name in the grouping code. |
| `operating.non_cash[].amount` | number | yes | What its change added to cash (positive) or took from it (negative). |
| `operating.working_capital` | array of object | yes | The change in customers, inventories, suppliers, taxes and other operating accounts. |
| `operating.working_capital[].grouping_code` | string | yes | The SAT grouping code (its first level, or 202.01 to 202.12). |
| `operating.working_capital[].name` | string | yes | Its name in the grouping code. |
| `operating.working_capital[].amount` | number | yes | What its change added to cash (positive) or took from it (negative). |
| `operating.total` | number | yes | Net cash flow from operating activities. |
| `investing` | object | yes | Investing activities: fixed assets, land, deferred items and permanent investments. |
| `investing.lines` | array of object | yes | Each group of accounts that changed. |
| `investing.lines[].grouping_code` | string | yes | The SAT grouping code (its first level, or 202.01 to 202.12). |
| `investing.lines[].name` | string | yes | Its name in the grouping code. |
| `investing.lines[].amount` | number | yes | What its change added to cash (positive) or took from it (negative). |
| `investing.total` | number | yes | The activity's net flow. |
| `financing` | object | yes | Financing activities: bank loans, dividends, contributions and capital. |
| `financing.lines` | array of object | yes | Each group of accounts that changed. |
| `financing.lines[].grouping_code` | string | yes | The SAT grouping code (its first level, or 202.01 to 202.12). |
| `financing.lines[].name` | string | yes | Its name in the grouping code. |
| `financing.lines[].amount` | number | yes | What its change added to cash (positive) or took from it (negative). |
| `financing.total` | number | yes | The activity's net flow. |
| `net_change` | number | yes | Net increase (or decrease) in cash. |
| `cash_beginning` | number | yes | Cash, banks and investments (101 to 103) at the start of the period. |
| `cash_end` | number | yes | Cash, banks and investments at the close of the period. |
| `difference` | number | yes | cash_end − (cash_beginning + net_change): 0 when the trial balance balances. |

```json
{
  "object": "cash_flow",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "month": "2026-02",
  "period": "year_to_date",
  "net_income": 12000,
  "operating": {
    "non_cash": [
      {
        "grouping_code": "171",
        "name": "Depreciación acumulada de activos fijos",
        "amount": 1000
      }
    ],
    "working_capital": [
      {
        "grouping_code": "105",
        "name": "Clientes",
        "amount": -5800
      },
      {
        "grouping_code": "205",
        "name": "Acreedores diversos a corto plazo",
        "amount": 2000
      },
      {
        "grouping_code": "208",
        "name": "Impuestos trasladados cobrados",
        "amount": 1600
      },
      {
        "grouping_code": "209",
        "name": "Impuestos trasladados no cobrados",
        "amount": 800
      }
    ],
    "total": 11600
  },
  "investing": {
    "lines": [
      {
        "grouping_code": "151",
        "name": "Terrenos",
        "amount": -50000
      },
      {
        "grouping_code": "155",
        "name": "Mobiliario y equipo de oficina",
        "amount": -20000
      }
    ],
    "total": -70000
  },
  "financing": {
    "lines": [
      {
        "grouping_code": "202.01",
        "name": "Documentos por pagar bancario y financiero nacional",
        "amount": 30000
      },
      {
        "grouping_code": "301",
        "name": "Capital social",
        "amount": 10000
      }
    ],
    "total": 40000
  },
  "net_change": -18400,
  "cash_beginning": 100000,
  "cash_end": 81600,
  "difference": 0
}
```

## Errors

- `feature_not_in_plan` (403): 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.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): 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.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
