ETTS

ETTS

ETTS (temporary employment agencies).

HTTP header parameters

  • Authorization (string): API authorisation. Example: Bearer {token}
  • X-Cert-Secret (string) : Secret key associated with the client certificate.

Base URL

https://api.saltra.es/api/v4/seg-social

Errors

Errors returned by the Social Security API, or validation errors.

Response parameters

  • success (boolean) : Returns "true" when everything is correct, and "false" when there are errors.
  • message (string) : The response message.
  • errors (array) : Errors captured by the API, either from Social Security or validation errors.
    • tgss: Errors related to Social Security.
    • regimen: Validation errors.
  • maintenance (boolean) : Set when Social Security is under maintenance.

Response

Respuesta
{
  "success": false,
  "message": "Página no operativa, inténtelo de nuevo más tarde. StatusCode: 500",
  "status": 500,
  "data": [],
  "errors": {
    "tgss": [
      "Página no operativa, inténtelo de nuevo más tarde. StatusCode: 500"
    ],
    "regimen": ["El campo regimen es obligatorio."]
  },
  "maintenance": true
}

Create a registration

Parameters

  • test (number (1)) : For testing, add the test=1 parameter. It must be omitted in production.
  • regimen (integer) : Scheme, 4 digits. Possible values:
  • ccc (integer) : Contribution account code, 11 digits.
  • nss (integer) : Social Security number, 12 digits.
  • identificacion (integer) : Identification number. Possible values:
    • 1: DNI
    • 2: Passport
    • 6: NIE
  • dni (string) : National identity document.
  • fecha_real (date) : Registration date, format YYYY-MM-DD.
  • grupo_cotizacion (integer) : Contribution group, maximum 2 digits. Possible values:
  • tipo_contrato (integer) : Contract type, 3 digits. Possible values:
  • cno (integer) : National Classification of Occupations, maximum 4 digits. Possible values:
  • category_professional (integer) : Professional category, valid only for the Artists Scheme (0112), 7 digits, mandatory. Possible values:
  • coeficiente optional (integer) : Part-time coefficient, for part-time working hours, maximum 3 digits.
  • rlce optional (integer) : Special Employment Relationship, maximum 4 digits. Possible values:
  • worker_collective optional (integer) : Worker collective; mandatory for contract types (402, 502, 407, 507), 3 digits. Possible values:
  • ocupacion optional (string) : Worker's occupation. Possible values:
  • convenio optional (integer) : Collective agreement, 14 digits. Possible values:
  • modalidad_ctz optional (integer) : Contribution method, valid for the Agricultural Scheme (0163). Possible values:
    • 1: Monthly contribution
    • 2: Actual days worked
  • fic optional (date) : Specific contract start date. For moving between contribution accounts within the same company or group of companies, format YYYY-MM-DD.
  • sust_cause optional (integer) : Replacement reason, 2 digits. Possible values:
  • sust_nss optional (integer) : Social Security number, 12 digits, mandatory if a replacement reason is given.
  • duplicate optional (integer) : Get the PDF as base64 in JSON format in the response; possible values are 1 or null.
  • obtener_idc optional (integer) : Get the IDC PDF as base64 in JSON format in the response; possible values are 1 or null. The request will take longer to respond.
  • exc_ctz optional (integer) : Employment relationship type, 3 digits. Possible values:
  • cond_desempleado optional (string): Unemployment status. Possible values:
  • beneficios optional (string): Benefits. Required when cond_desempleado = 1. Possible values:
  • fom_empl_agrario optional (integer): For the Agricultural Scheme. Possible values:
    • 1: Agricultural employment promotion
    • 2: With excess contribution < 30D.
  • sexo optional (string) : Sex. Possible values:
    • M: Male
    • F: Female
  • fnacimiento optional (date) : Date of birth. Format YYYY-MM-DD.
  • cesion_regimen (integer) : Scheme, 4 digits. Possible values:
  • cesion_ccc (integer) : Contribution account code, 11 digits.
  • cesion_tipo (integer) : Possible values:
    • 01: Sheltered employment enclave
    • 02: Temporary employment agency (ETT)
    • 03: Works/services subcontracting
    • 04: Nautical management
POST /alta
{
  "test": 1,
  "regimen": "0111",
  "ccc": 12345678901,
  "nss": 123456789012,
  "identificacion": 1,
  "dni": "12345678A",
  "fecha_real": "2023-01-01",
  "grupo_cotizacion": 12,
  "tipo_contrato": 402,
  "cno": 1234,
  "category_professional": 1234567,
  "coeficiente": "500",
  "rlce": 1234,
  "worker_collective": 123,
  "ocupacion": "a",
  "convenio": 12345678901234,
  "modalidad_ctz": 2,
  "fic": "2023-02-01",
  "cesion_regimen": "0111",
  "cesion_ccc": 12345678901,
  "cesion_tipo": "02",
  "duplicate": 1
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "file": {
      "contentType": "application/pdf",
      "name": "document.pdf",
      "content": "base64"
    },
    "idc": {
      // Si se envia obtener_idc = 1
      "contentType": "application/pdf",
      "name": "document.pdf",
      "content": "base64"
    }
  }
}

Delete an assignment

Parameters

  • test (number (1)) : For testing, add the test=1 parameter. It must be omitted in production.
  • regimen (integer) : Scheme, 4 digits. Possible values:
  • ccc (integer) : Contribution account code, 11 digits.
  • cesion_regimen (integer) : Scheme, 4 digits.
  • cesion_ccc (integer) : Contribution account code, 11 digits.
  • identificacion (integer) : Identification number. Possible values:
    • 1: DNI
    • 2: Passport
    • 6: NIE
  • dni (string) : National identity document.
  • nss (integer) : Social Security number, 12 digits.
  • startDate (date) : Assignment date, format YYYY-MM-DD.
DELETE /etts/cesion
{
  "nss": "131009999999",
  "identificacion": 1,
  "dni": "009965999X",
  "regimen": "0111",
  "ccc": "99139997999",
  "cesion_tipo": "02",
  "cesion_ccc": "28998364999",
  "cesion_regimen": "0111",
  "startDate": "2025-12-01"
}

Response

Respuesta
{
  "success": true,
  "message": "OK"
}

Update an assignment

Parameters

  • test (number (1)) : For testing, add the test=1 parameter. It must be omitted in production.
  • regimen (integer) : Scheme, 4 digits. Possible values:
  • ccc (integer) : Contribution account code, 11 digits.
  • cesion_regimen (integer) : Scheme, 4 digits.
  • cesion_ccc (integer) : Contribution account code, 11 digits.
  • identificacion (integer) : Identification number. Possible values:
    • 1: DNI
    • 2: Passport
    • 6: NIE
  • dni (string) : National identity document.
  • nss (integer) : Social Security number, 12 digits.
  • startDate (date) : Assignment date, format YYYY-MM-DD.
  • endDate (date) : Assignment end date, format YYYY-MM-DD.
PUT /etts/cesion
{
  "nss": "131009999999",
  "identificacion": 1,
  "dni": "009965999X",
  "regimen": "0111",
  "ccc": "99139997999",
  "cesion_tipo": "02",
  "cesion_ccc": "28998364999",
  "cesion_regimen": "0111",
  "startDate": "2025-12-01",
  "endDate": "2025-12-03"
}

Response

Respuesta
{
  "success": true,
  "message": "OK"
}

Add an assignment

Parameters

  • test (number (1)) : For testing, add the test=1 parameter. It must be omitted in production.
  • regimen (integer) : Scheme, 4 digits. Possible values:
  • ccc (integer) : Contribution account code, 11 digits.
  • cesion_regimen (integer) : Scheme, 4 digits.
  • cesion_ccc (integer) : Contribution account code, 11 digits.
  • identificacion (integer) : Identification number. Possible values:
    • 1: DNI
    • 2: Passport
    • 6: NIE
  • dni (string) : National identity document.
  • nss (integer) : Social Security number, 12 digits.
  • startDate (date) : Assignment date, format YYYY-MM-DD.
  • endDate (date) : Assignment end date, format YYYY-MM-DD.
POST /etts/cesion
{
  "nss": "131009999999",
  "identificacion": 1,
  "dni": "009965999X",
  "regimen": "0111",
  "ccc": "99139997999",
  "cesion_tipo": "02",
  "cesion_ccc": "28998364999",
  "cesion_regimen": "0111",
  "startDate": "2025-12-01",
  "endDate": "2025-12-01"
}

Response

Respuesta
{
  "success": true,
  "message": "OK"
}

Query employee assignments and situations

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.
  • ces optional (bool) : Companies the worker is assigned to.
GET /etts/cesion
{
  "regimen": "0111",
  "ccc": "12345678901",
  "dni": "12345678B"
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "status": 200,
  "data": [
    {
      "nss": "139991519999",
      "identificacion": "1",
      "dni": "099995999X",
      "fnacimiento": "1972-12-01",
      "sexo": "M",
      "nombres": "JOSE",
      "apellidos": "ETZ GONZALO",
      "tlf": "",
      "regimen": "0111",
      "ccc": "99132827999",
      "worker_collective": "967",
      "situacion": "01",
      "situacion_text": "ALTA NORMAL",
      "grupo_cotizacion": "09",
      "grupo_cotizacion_text": "OFICIALES 3`Y ESPEC",
      "tipo_contrato": "402",
      "coef": "",
      "fecha_alta": "2025-12-01",
      "cesions": [
        {
          "name": "JOSE ASESORES",
          "tipo": "02",
          "regimen": "0111",
          "ccc": "13991977999",
          "startDate": "2025-12-01"
        }
      ]
    }
  ]
}