# ICSOE and SISUB returns for a four-month period

`GET https://api.fiscalisto.com/v1/repse_returns/{period}`

What is filed for the four-month period (YYYY-1 January to April, YYYY-2 May to August, YYYY-3 September to December) by the 17th of the following month, or the next business day: per contract, its workers with NSS, CURP and last contribution base salary (ICSOE, LSS art. 15-A), and per worker and two-month period the earnings, the salary capped at 25 UMA, the 5% contribution and their credit's repayment (SISUB, Ley del Infonavit art. 29 Bis), calculated from the stamped receipts. files has the files to upload: the three for SISUB and one ICSOE file per contract. problems says what's missing to file them.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `period` | 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. |

## With the TypeScript SDK

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

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

const repseReturn = await fiscalisto.repseReturns.get("{period}");
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

repse_return = fiscalisto.repse_returns.get("{period}")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$repseReturn = $fiscalisto->repseReturns->get('{period}');
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var repseReturn = await fiscalisto.RepseReturns.GetAsync("{period}");
```

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

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

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

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

var repseReturn = fiscalisto.repseReturns().get("{period}");
System.out.println(repseReturn);
```

## Response 200

OK.

A `RepseReturn` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"repse_return"` | 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 (iss_…). |
| `period` | string | yes | The four-month period: YYYY-1 (January to April), YYYY-2 or YYYY-3. |
| `start_date` | string | yes | First day of the period. |
| `end_date` | string | yes | Last day of the period. |
| `due_date` | string | yes | Last day to file them: January, May or September 17, or the next business day (CFF art. 12). |
| `contracts` | array of object | yes | The contracts in force in the period. |
| `contracts[].contract` | string | yes | The contract (rpc_…). |
| `contracts[].number` | string | yes | Its contract number. |
| `contracts[].workers` | array of object | yes | Its workers in the period (the ICSOE CSV). |
| `contracts[].workers[].employee` | string | yes | The employee (emp_…). |
| `contracts[].workers[].name` | string | yes | Its name. |
| `contracts[].workers[].nss` | string | yes | Their NSS, 11 digits. |
| `contracts[].workers[].curp` | string | yes | Their CURP. |
| `contracts[].workers[].sbc` | number | yes | Their last contribution base salary in the period, up to 25 UMA. |
| `workers` | array of object | yes | Each worker per two-month period (the SISUB worker detail). |
| `workers[].employee` | string | yes | The employee (emp_…). |
| `workers[].name` | string | yes | Its name. |
| `workers[].nss` | string | yes | Their NSS. |
| `workers[].bimester` | integer | yes | The two-month period of the year (1 to 6). (from -9007199254740991 to 9007199254740991) |
| `workers[].contracts` | array of string | yes | The numbers of the contracts they worked on in that two-month period. |
| `workers[].variable_perceptions` | number | yes | The previous two-month period's variable earnings that made up their salary (LSS arts. 27 and 30). |
| `workers[].fixed_perceptions` | number | yes | What was paid in the two-month period as wages, Christmas bonus and vacation premium. |
| `workers[].disability_days` | integer | yes | Disability days in the two-month period. (from -9007199254740991 to 9007199254740991) |
| `workers[].non_integrable_perceptions` | number | yes | Everything else paid in the two-month period that doesn't make up the salary. |
| `workers[].capped_salary` | number | yes | Their base salary at the end of the two-month period, up to 25 UMA. |
| `workers[].infonavit_contribution` | number | yes | Their Infonavit contribution for the two-month period (5% of the base salary). |
| `workers[].has_credit` | boolean | yes | true if they had an Infonavit credit deduction in the two-month period. |
| `workers[].amortization` | number | yes | What was deducted as credit repayment in the two-month period. |
| `totals` | object | yes | What the SISUB obligated-party file adds up. |
| `totals.contributions_without_credit` | number | yes | Contributions of workers without a credit. |
| `totals.contributions_with_credit` | number | yes | Contributions of workers with a credit. |
| `totals.amortizations` | number | yes | Repayments deducted. |
| `problems` | array of string | yes | What is missing or wrong before filing them; empty if nothing. |
| `files` | array of object | yes | The 3 SISUB CSVs (obligated party, contracts, workers) and one ICSOE worker CSV per contract. |
| `files[].name` | string | yes | File name. |
| `files[].system` | `sisub`, `icsoe` | yes | sisub (Infonavit) or icsoe (IMSS). |
| `files[].content` | string | yes | The CSV, as text. |

```json
{
  "object": "repse_return",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "period": "2026-3",
  "start_date": "2026-09-01",
  "end_date": "2026-12-31",
  "due_date": "2027-01-18",
  "contracts": [
    {
      "contract": "rpc_OufpKqnrvx9p4Hc8Lw2Tn6Vq0aRzXs3M1d",
      "number": "2026001",
      "workers": [
        {
          "employee": "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
          "name": "MARÍA PÉREZ LÓPEZ",
          "nss": "12345678903",
          "curp": "PELM900101MNLRPR09",
          "sbc": 532.5
        }
      ]
    }
  ],
  "workers": [
    {
      "employee": "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
      "name": "MARÍA PÉREZ LÓPEZ",
      "nss": "12345678903",
      "bimester": 5,
      "contracts": [
        "2026001"
      ],
      "variable_perceptions": 0,
      "fixed_perceptions": 30000,
      "disability_days": 0,
      "non_integrable_perceptions": 0,
      "capped_salary": 532.5,
      "infonavit_contribution": 1624.13,
      "has_credit": false,
      "amortization": 0
    }
  ],
  "totals": {
    "contributions_without_credit": 1624.13,
    "contributions_with_credit": 0,
    "amortizations": 0
  },
  "problems": [],
  "files": [
    {
      "name": "SISUB_2026-3_sujeto_obligado.csv",
      "system": "sisub",
      "content": "RFC,Razon social,...\r\n"
    }
  ]
}
```

## 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.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

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