Skip to Content
Social SecurityQueriesEmployee's situation within the company

Query an employee’s situation within the company

Parameters

  • regimen (integer) : Scheme, 4 digits. Possible values:
  • ccc (integer) : Contribution account code, 11 digits.
  • dni (string) : National identity document.
  • startDate optional (date) : Registration date, format YYYY-MM-DD.
  • first optional (integer) : If you want to retrieve only one record, the most recent one; possible values are 1 or null.
  • getConvenio optional (integer) : If you want to retrieve a worker’s collective agreements; possible values are 1 or null.
  • pl_period optional (string) : Query the specific conditions, format YYYY-MM. Example: 2025-03
  • getDatos optional (integer) : If you want to retrieve the CNO; possible values are 1 or null.
  • getTc optional (integer) : If you want to retrieve the data of the “+TC” screen (contribution specifics) of the RED System; possible values are 1 or null. They are returned in each record, under the tc key, with the fields rlce (special employment relationship code, e.g. 0600), rlce_text (RLCE description), special_code (the screen’s “C.Esp” field, exactly as reported by TGSS), sepe_contract_type (contract type reported to SEPE), unemployed_company and unemployed_company_text (unemployed status declared by the company), unemployed_spee and unemployed_spee_text (unemployed status according to the SPEE), fic_age (worker’s age on the contract start date, integer) and fict_calculated (contract start date calculated by TGSS, format YYYY-MM-DD). Every field may be null if TGSS does not report it.
  • offset optional (integer) : Paginated continuation. Number of records already returned in previous calls that must be skipped. Defaults to 0. Each call returns a maximum of 10 records; use this value (or continueToken) to obtain the following ones.
  • continueToken optional (string) : Continuation token returned in the previous response when limitReached is true. If sent, the offset is recovered automatically from the session and does not need to be resent.
GET /employee-situations
{ "regimen": "0111", "ccc": "12345678901", "dni": "12345678B", "startDate": "2023-01-01" }

The response returns a maximum of 10 records per call. If the employee has more situations, the response will include limitReached: true together with a continueFrom block and a continueToken. To obtain the following records, repeat the request sending that continueToken (or the offset given in continueFrom). When no records remain, the response returns to "message": "OK" without limitReached.

Response

Respuesta
{ "success": true, "message": "OK", "data": [ { "nss": "999999999999", "identificacion": "1", "dni": "012323132X", "fnacimiento": "1999-12-31", "sexo": "M", "nombres": "NOMBRE", "apellidos": "APELLIDOS", "tlf": "699999999", "regimen": "0111", "ccc": "28199999999", "situacion": "01", "situacion_text": "ALTA NORMAL", "grupo_cotizacion": "04", "grupo_cotizacion_text": "AYUDANTES NO TITULA", "tipo_contrato": "300", "coef": "075", "cno":"3820", "category_professional":"6100745", "fecha_alta": "2023-12-31", "fecha_baja": "2023-12-31", "pl": [ { "tramo": "1", "titulo": "", "tipo_peculiaridad": "16", "tipo_peculiaridad_desc": "BON.P.F.EMPL.CUANTIA", "colectivo_incentivado": "1839", "colectivo_incentivado_desc": "TRANSF.IND.FOR-HOMB", "porcentaje": "", "fecha_desde": "2026-04-01", "fecha_hasta": "2026-04-30", "fraccion_cuota": "01", "fraccion_cuota_desc": "CUOTA EMPRESARIAL", "legislacion": "0243", "legislacion_desc": "RDL 1/2023", "cuantia": "128,00" } ], "tc": { "rlce": "0600", "rlce_text": "MINUS.CEN.ESP.EMPLEO", "special_code": "2220", "sepe_contract_type": "410", "unemployed_company": "1", "unemployed_company_text": "DES./DES.INSC.OF.EMP", "unemployed_spee": "1", "unemployed_spee_text": "DES./DES.INSC.OF.EMP", "fic_age": 26, "fict_calculated": "2026-07-07" } } ] }

Response with a limited result (paginated continuation)

When the employee has more than 10 situations, the response sets limitReached: true and adds the data needed to continue. Repeat the request sending the continueToken (or the offset from continueFrom) to obtain the next block.

Respuesta (limitada)
{ "success": true, "message": "Resultado limitado a 10 registros. Puede continuar la consulta para obtener los siguientes.", "data": [ { "nss": "999999999999", "dni": "012323132X", "regimen": "0111", "ccc": "28199999999", "situacion_text": "ALTA NORMAL", "tipo_contrato": "100", "fecha_alta": "2023-01-16" } ], "limitReached": true, "continueFrom": { "regimen": "0111", "ccc": "28199999999", "nss": null, "dni": "012323132X", "offset": 10, "continueToken": "emp_situations_0111_28199999999_012323132X" }, "continueToken": "emp_situations_0111_28199999999_012323132X" }
GET /employee-situations (siguiente bloque)
{ "regimen": "0111", "ccc": "12345678901", "dni": "12345678B", "continueToken": "emp_situations_0111_28199999999_012323132X" }
Last updated on