# Calculate the annual inflation adjustment

`GET https://api.fiscalisto.com/v1/accounting/inflation_adjustments/{year}`

A persona moral's annual inflation adjustment (article 44 of the Ley del ISR): the sum of the balances on the last day of each month of its receivables and of its debts over the months of the fiscal year, and the difference times the annual adjustment factor. Larger debts give a cumulative adjustment (taxable); larger receivables, a deductible one. Each account counts by its grouping code (with the reason in reason) or as you marked it with POST /v1/accounting/inflation_accounts. In the current year it's an estimate up to the current month. Like Estados financieros › Ajuste por inflación in the app.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `year` | path | yes | The object's id. |
| `issuer` | query |  | The issuer (iss_…). It can be left out if the key or the account has only one. |
| `from_month` | query |  | The fiscal year's first month, from 1 to 12. 1 by default; another one if the company started during the year. |
| `through_month` | query |  | The last month, from 1 to 12. By default 12 in a past year and the current month in the current year. |

## With the TypeScript SDK

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

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

const inflationAdjustment = await fiscalisto.inflationAdjustments.get("{year}");
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

inflation_adjustment = fiscalisto.inflation_adjustments.get("{year}")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$inflationAdjustment = $fiscalisto->inflationAdjustments->get('{year}');
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var inflationAdjustment = await fiscalisto.InflationAdjustments.GetAsync("{year}");
```

## 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()

	inflationAdjustment, err := client.InflationAdjustments.Get(ctx, "{year}", nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *inflationAdjustment)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

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

var inflationAdjustment = fiscalisto.inflationAdjustments().get("{year}");
System.out.println(inflationAdjustment);
```

## Response 200

OK.

A `InflationAdjustment` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"inflation_adjustment"` | 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. |
| `year` | integer | yes | The fiscal year. (from -9007199254740991 to 9007199254740991) |
| `from_month` | integer | yes | The first month of the fiscal year (1, or the month it started if it was during the year). (from -9007199254740991 to 9007199254740991) |
| `through_month` | integer | yes | The last month calculated: 12, or an earlier one for an estimate. (from -9007199254740991 to 9007199254740991) |
| `months` | integer | yes | How many months were averaged. (from -9007199254740991 to 9007199254740991) |
| `accounts` | array of object | yes | Each balance sheet account with a balance in the fiscal year. |
| `accounts[].account` | string | yes | The account number. |
| `accounts[].name` | string | yes | Its name. |
| `accounts[].grouping_code` | string | yes | Its SAT grouping code. |
| `accounts[].treatment` | `credit`, `debt`, `none` | yes | credit (art. 45 of the LISR), debt (art. 46) or none. |
| `accounts[].changed` | boolean | yes | true if it was changed from its grouping code's (POST /v1/accounting/inflation_accounts). |
| `accounts[].reason` | string | yes | Why it counts that way, with the law article. |
| `accounts[].month_end_balances` | array of number | yes | The balance on the last day of each month, positive as a credit or as a debt (with none, the book balance). |
| `accounts[].average_balance` | number | yes | The sum of the balances divided by the months (0 with none). |
| `credits_by_month` | array of number | yes | Credits on the last day of each month. |
| `debts_by_month` | array of number | yes | Debts on the last day of each month. |
| `average_credits` | number | yes | The annual average balance of credits. |
| `average_debts` | number | yes | The annual average balance of debts. |
| `difference` | number | yes | The difference between the two averages, positive. |
| `factor` | number or null | yes | The annual adjustment factor: the last month's INPC over that of the previous fiscal year's last month, minus 1, to four decimals. null without a published INPC. |
| `inpc_start` | number or null | yes | The base INPC. |
| `inpc_end` | number or null | yes | The last month's INPC. |
| `inpc_end_month` | string or null | yes | Which month inpc_end is from (YYYY-MM): December, or the last published one for an estimate. |
| `estimated` | boolean | yes | true while there are no December balances or December INPC: an estimate. |
| `type` | `taxable`, `deductible` or null | yes | taxable (cumulative, art. 18 fr. X) when debts are greater; deductible (art. 25 fr. VIII) when credits are. |
| `amount` | number or null | yes | The annual inflation adjustment: difference × factor. |

```json
{
  "object": "inflation_adjustment",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "year": 2025,
  "from_month": 1,
  "through_month": 12,
  "months": 12,
  "accounts": [
    {
      "account": "102-01",
      "name": "Bancos",
      "grouping_code": "102.01",
      "treatment": "credit",
      "changed": false,
      "reason": "Depósitos en bancos: derecho a recibir numerario (art. 45).",
      "month_end_balances": [
        100000,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600,
        90600
      ],
      "average_balance": 91383.33
    },
    {
      "account": "202-01",
      "name": "Préstamos bancarios",
      "grouping_code": "202.01",
      "treatment": "debt",
      "changed": false,
      "reason": "Capitales tomados en préstamo y cuentas por pagar (art. 46).",
      "month_end_balances": [
        0,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000,
        30000
      ],
      "average_balance": 27500
    }
  ],
  "credits_by_month": [
    100000,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600,
    90600
  ],
  "debts_by_month": [
    0,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000,
    30000
  ],
  "average_credits": 91383.33,
  "average_debts": 27500,
  "difference": 63883.33,
  "factor": 0.0369,
  "inpc_start": 137.949,
  "inpc_end": 143.042,
  "inpc_end_month": "2025-12",
  "estimated": false,
  "type": "deductible",
  "amount": 2357.29
}
```

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