# Compare the financial statements with another month

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

The income statement (for the month and from January to the month) and the balance sheet next to those of the same month of the previous year (compare_to=previous_year, the default) or of the previous month (previous_month), with the change and its percentage by group of accounts. Like Estados financieros › Comparativo in the app.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `month` | query | yes | The month (YYYY-MM). |
| `compare_to` | query |  | previous_year (the same month of the previous year, the default) or previous_month. |
| `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 comparativeStatements = await fiscalisto.accounting.comparativeStatements({ month: "2026-10" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

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

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

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

## With the .NET SDK

```csharp
using Fiscalisto;

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

var comparativeStatements = await fiscalisto.Accounting.ComparativeStatementsAsync(new GetComparativeStatementsParams { 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()

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

## With the Java SDK

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

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

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

## Response 200

OK.

A `ComparativeStatements` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"comparative_statements"` | 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). |
| `compared_to` | string | yes | The month it is compared with (YYYY-MM). |
| `income_statement` | object | yes | The comparative income statement. |
| `income_statement.month` | object | yes | The month against the compared month. |
| `income_statement.month.sections` | array of object | yes | Each income statement section. Costs and expenses positive: an increase is more expense. |
| `income_statement.month.sections[].key` | `ingresos`, `costos`, `gastos`, `financiamiento`, `otros` | yes | The section. |
| `income_statement.month.sections[].name` | string | yes | Its name. |
| `income_statement.month.sections[].lines` | array of object | yes | Each group of accounts. |
| `income_statement.month.sections[].lines[].grouping_code` | string | yes | The grouping code (first level). |
| `income_statement.month.sections[].lines[].name` | string | yes | Its name. |
| `income_statement.month.sections[].lines[].current` | number | yes | The period's amount. |
| `income_statement.month.sections[].lines[].previous` | number | yes | The one for the period it is compared with. |
| `income_statement.month.sections[].lines[].change` | number | yes | current − previous. |
| `income_statement.month.sections[].lines[].change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `income_statement.month.sections[].total` | object | yes | The section's total. |
| `income_statement.month.sections[].total.current` | number | yes | The period's amount. |
| `income_statement.month.sections[].total.previous` | number | yes | The one for the period it is compared with. |
| `income_statement.month.sections[].total.change` | number | yes | current − previous. |
| `income_statement.month.sections[].total.change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `income_statement.month.income_before_taxes` | object | yes | The profit before taxes. |
| `income_statement.month.income_before_taxes.current` | number | yes | The period's amount. |
| `income_statement.month.income_before_taxes.previous` | number | yes | The one for the period it is compared with. |
| `income_statement.month.income_before_taxes.change` | number | yes | current − previous. |
| `income_statement.month.income_before_taxes.change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `income_statement.year_to_date` | object | yes | January to the month against January to the compared month. |
| `income_statement.year_to_date.sections` | array of object | yes | Each income statement section. Costs and expenses positive: an increase is more expense. |
| `income_statement.year_to_date.sections[].key` | `ingresos`, `costos`, `gastos`, `financiamiento`, `otros` | yes | The section. |
| `income_statement.year_to_date.sections[].name` | string | yes | Its name. |
| `income_statement.year_to_date.sections[].lines` | array of object | yes | Each group of accounts. |
| `income_statement.year_to_date.sections[].lines[].grouping_code` | string | yes | The grouping code (first level). |
| `income_statement.year_to_date.sections[].lines[].name` | string | yes | Its name. |
| `income_statement.year_to_date.sections[].lines[].current` | number | yes | The period's amount. |
| `income_statement.year_to_date.sections[].lines[].previous` | number | yes | The one for the period it is compared with. |
| `income_statement.year_to_date.sections[].lines[].change` | number | yes | current − previous. |
| `income_statement.year_to_date.sections[].lines[].change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `income_statement.year_to_date.sections[].total` | object | yes | The section's total. |
| `income_statement.year_to_date.sections[].total.current` | number | yes | The period's amount. |
| `income_statement.year_to_date.sections[].total.previous` | number | yes | The one for the period it is compared with. |
| `income_statement.year_to_date.sections[].total.change` | number | yes | current − previous. |
| `income_statement.year_to_date.sections[].total.change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `income_statement.year_to_date.income_before_taxes` | object | yes | The profit before taxes. |
| `income_statement.year_to_date.income_before_taxes.current` | number | yes | The period's amount. |
| `income_statement.year_to_date.income_before_taxes.previous` | number | yes | The one for the period it is compared with. |
| `income_statement.year_to_date.income_before_taxes.change` | number | yes | current − previous. |
| `income_statement.year_to_date.income_before_taxes.change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `balance_sheet` | array of object | yes | The balance sheet at each month's close. |
| `balance_sheet[].key` | `assets`, `liabilities`, `equity` | yes | The section. |
| `balance_sheet[].name` | string | yes | Its name. |
| `balance_sheet[].lines` | array of object | yes | Each group of accounts. |
| `balance_sheet[].lines[].grouping_code` | string | yes | The grouping code (first level). |
| `balance_sheet[].lines[].name` | string | yes | Its name. |
| `balance_sheet[].lines[].current` | number | yes | The period's amount. |
| `balance_sheet[].lines[].previous` | number | yes | The one for the period it is compared with. |
| `balance_sheet[].lines[].change` | number | yes | current − previous. |
| `balance_sheet[].lines[].change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |
| `balance_sheet[].total` | object | yes | The section's total. |
| `balance_sheet[].total.current` | number | yes | The period's amount. |
| `balance_sheet[].total.previous` | number | yes | The one for the period it is compared with. |
| `balance_sheet[].total.change` | number | yes | current − previous. |
| `balance_sheet[].total.change_percent` | number or null | yes | change divided by previous, as a percentage (null when previous is 0). |

```json
{
  "object": "comparative_statements",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "month": "2026-02",
  "compared_to": "2026-01",
  "income_statement": {
    "month": {
      "sections": [
        {
          "key": "ingresos",
          "name": "Ingresos",
          "lines": [
            {
              "grouping_code": "401",
              "name": "Ingresos",
              "current": 15000,
              "previous": 0,
              "change": 15000,
              "change_percent": null
            }
          ],
          "total": {
            "current": 15000,
            "previous": 0,
            "change": 15000,
            "change_percent": null
          }
        },
        {
          "key": "costos",
          "name": "Costo de ventas",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        },
        {
          "key": "gastos",
          "name": "Gastos de operación",
          "lines": [
            {
              "grouping_code": "601",
              "name": "Gastos generales",
              "current": 2000,
              "previous": 0,
              "change": 2000,
              "change_percent": null
            },
            {
              "grouping_code": "613",
              "name": "Depreciación contable",
              "current": 1000,
              "previous": 0,
              "change": 1000,
              "change_percent": null
            }
          ],
          "total": {
            "current": 3000,
            "previous": 0,
            "change": 3000,
            "change_percent": null
          }
        },
        {
          "key": "financiamiento",
          "name": "Resultado integral de financiamiento",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        },
        {
          "key": "otros",
          "name": "Otros ingresos y gastos",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        }
      ],
      "income_before_taxes": {
        "current": 12000,
        "previous": 0,
        "change": 12000,
        "change_percent": null
      }
    },
    "year_to_date": {
      "sections": [
        {
          "key": "ingresos",
          "name": "Ingresos",
          "lines": [
            {
              "grouping_code": "401",
              "name": "Ingresos",
              "current": 15000,
              "previous": 0,
              "change": 15000,
              "change_percent": null
            }
          ],
          "total": {
            "current": 15000,
            "previous": 0,
            "change": 15000,
            "change_percent": null
          }
        },
        {
          "key": "costos",
          "name": "Costo de ventas",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        },
        {
          "key": "gastos",
          "name": "Gastos de operación",
          "lines": [
            {
              "grouping_code": "601",
              "name": "Gastos generales",
              "current": 2000,
              "previous": 0,
              "change": 2000,
              "change_percent": null
            },
            {
              "grouping_code": "613",
              "name": "Depreciación contable",
              "current": 1000,
              "previous": 0,
              "change": 1000,
              "change_percent": null
            }
          ],
          "total": {
            "current": 3000,
            "previous": 0,
            "change": 3000,
            "change_percent": null
          }
        },
        {
          "key": "financiamiento",
          "name": "Resultado integral de financiamiento",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        },
        {
          "key": "otros",
          "name": "Otros ingresos y gastos",
          "lines": [],
          "total": {
            "current": 0,
            "previous": 0,
            "change": 0,
            "change_percent": null
          }
        }
      ],
      "income_before_taxes": {
        "current": 12000,
        "previous": 0,
        "change": 12000,
        "change_percent": null
      }
    }
  },
  "balance_sheet": [
    {
      "key": "assets",
      "name": "Activo",
      "lines": [
        {
          "grouping_code": "102",
          "name": "Bancos",
          "current": 81600,
          "previous": 100000,
          "change": -18400,
          "change_percent": -18.4
        },
        {
          "grouping_code": "105",
          "name": "Clientes",
          "current": 5800,
          "previous": 0,
          "change": 5800,
          "change_percent": null
        },
        {
          "grouping_code": "151",
          "name": "Terrenos",
          "current": 50000,
          "previous": 0,
          "change": 50000,
          "change_percent": null
        },
        {
          "grouping_code": "155",
          "name": "Mobiliario y equipo de oficina",
          "current": 20000,
          "previous": 0,
          "change": 20000,
          "change_percent": null
        },
        {
          "grouping_code": "171",
          "name": "Depreciación acumulada de activos fijos",
          "current": -1000,
          "previous": 0,
          "change": -1000,
          "change_percent": null
        }
      ],
      "total": {
        "current": 156400,
        "previous": 100000,
        "change": 56400,
        "change_percent": 56.4
      }
    },
    {
      "key": "liabilities",
      "name": "Pasivo",
      "lines": [
        {
          "grouping_code": "202",
          "name": "Cuentas por pagar a corto plazo",
          "current": 30000,
          "previous": 0,
          "change": 30000,
          "change_percent": null
        },
        {
          "grouping_code": "205",
          "name": "Acreedores diversos a corto plazo",
          "current": 2000,
          "previous": 0,
          "change": 2000,
          "change_percent": null
        },
        {
          "grouping_code": "208",
          "name": "Impuestos trasladados cobrados",
          "current": 1600,
          "previous": 0,
          "change": 1600,
          "change_percent": null
        },
        {
          "grouping_code": "209",
          "name": "Impuestos trasladados no cobrados",
          "current": 800,
          "previous": 0,
          "change": 800,
          "change_percent": null
        }
      ],
      "total": {
        "current": 34400,
        "previous": 0,
        "change": 34400,
        "change_percent": null
      }
    },
    {
      "key": "equity",
      "name": "Capital contable",
      "lines": [
        {
          "grouping_code": "301",
          "name": "Capital social",
          "current": 110000,
          "previous": 100000,
          "change": 10000,
          "change_percent": 10
        },
        {
          "grouping_code": "305",
          "name": "Resultado del ejercicio",
          "current": 12000,
          "previous": 0,
          "change": 12000,
          "change_percent": null
        }
      ],
      "total": {
        "current": 122000,
        "previous": 100000,
        "change": 22000,
        "change_percent": 22
      }
    }
  ]
}
```

## 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.
