Skip to Content

Get FIE files

To test without real effects, send the X-Saltra-Mode: test header: nothing is sent to the authority and the response carries sample data. In production, without the header, the request is real. Details in Environments and test mode.

Parameters

  • opcionesBusqueda optional (integer) : Search type. If omitted, 0 is used. It determines which fields are mandatory. Possible values:
    • 0 (default) : Company. Requires regimen and ccc.
    • 1 : Self-employed. Requires naf.
    • 2 : RED authorised user. Requires neither regimen, ccc nor naf; only the date range.
  • regimen (integer) : Scheme, 4 digits. Mandatory only when opcionesBusqueda=0 (Company). Possible values:
  • ccc (integer) : Contribution account code, 11 digits. Mandatory only when opcionesBusqueda=0 (Company).
  • naf (integer) : Affiliation number (NAF), 12 digits. Mandatory only when opcionesBusqueda=1 (Self-employed).
  • startDate (date) : Certificate start date, format YYYY-MM-DD.
  • endDate (date) : Certificate end date, format YYYY-MM-DD.
  • format optional (text) : Response format. Possible values:
    • excel (default) : Returns the report as an Excel file (data.file).
    • json : Returns the report already parsed, one row per worker (data.list).

The range between startDate and endDate cannot exceed 28 days (TGSS rejects 29 or more).

Example: Company (default)

GET /excel-fie
{ "regimen": "0111", "ccc":"13991977999", "startDate": "2026-01-15", "endDate": "2026-01-22", "format": "json" }

Example: Self-employed

GET /excel-fie
{ "opcionesBusqueda": 1, "naf": "281000000001", "startDate": "2026-01-15", "endDate": "2026-01-22" }

Example: RED authorised user

GET /excel-fie
{ "opcionesBusqueda": 2, "startDate": "2026-01-15", "endDate": "2026-01-22" }

Successful response (format=excel, default)

If you omit the format parameter or send format=excel, the response contains the Excel file as base64:

Respuesta (excel)
{ "success": true, "message": "3408* OPERACION REALIZADA CORRECTAMENTE", "status": 200, "data": { "file": { "contentType": "application/vnd.ms-excel", "name": "document.xls", "content": "base64" } } }

Successful response (format=json)

With format=json the report is returned parsed in data.list, with one object per worker. The keys are the column headers of the FIE report (company identification, worker, affiliation data and temporary disability data, among others) and come from the TGSS file itself: if it adds a column, it shows up on its own. Some headers repeat across sections of the report; the first keeps its name and the following ones carry their section code in brackets: Entidad Responsable (IT), Entidad Responsable (DIP) (permanent disability), Entidad Responsable (DOP) (other benefits), Fecha Baja IT and Fecha Baja IT (DIP).

The values in this example are fictitious. In the real response, each row includes every column of the FIE report (many of them may come back empty depending on the case).

Respuesta (json)
{ "success": true, "message": "OK", "status": 200, "data": { "list": [ { "Fecha Registro": "20260115", "C.C.C. Principal": "011113991977999", "Razón Social": "EMPRESA DEMO SL", "N.A.F.": "281000000001", "IPF": "00000001R", "Primer Apellido": "PEREZ", "Segundo Apellido": "GOMEZ", "Nombre": "JUAN", "Fecha Inicio Relación Laboral": "20250101", "Fecha Extinción Relación Laboral": "", "Entidad Responsable": "0", "Fecha Baja IT": "20260110", "Indicador Recaida": "N", "Días Acumulados": "0", "Contingencia": "1", "Tipo Proceso": "1", "Duración Estimada": "5", "Fecha Fin IT": "20260114", "Causa Fin IT": "06", "Base reguladora INSS": "40.00" }, { "Fecha Registro": "20260118", "C.C.C. Principal": "011113991977999", "Razón Social": "EMPRESA DEMO SL", "N.A.F.": "281000000002", "IPF": "00000002W", "Primer Apellido": "LOPEZ", "Segundo Apellido": "MARTIN", "Nombre": "MARIA", "Fecha Inicio Relación Laboral": "20240301", "Fecha Extinción Relación Laboral": "", "Entidad Responsable": "0", "Fecha Baja IT": "20260112", "Indicador Recaida": "S", "Días Acumulados": "22", "Contingencia": "1", "Tipo Proceso": "1", "Duración Estimada": "15", "Fecha Fin IT": "", "Causa Fin IT": "", "Base reguladora INSS": "38.50" } ] } }

No data

If the TGSS has no FIE files for those criteria and dates, the response is 404 with success: false, the TGSS message and data.no_data: true. It is a final answer, not a failure: there is no need to retry it.

Respuesta sin datos (404)
{ "success": false, "message": "SISTEMA RED: NO EXISTEN DATOS CON ESTOS CRITERIOS Código de error: 8", "status": 404, "errors": { "tgss": ["SISTEMA RED: NO EXISTEN DATOS CON ESTOS CRITERIOS Código de error: 8"] }, "data": { "no_data": true } }
Last updated on