Create a deregistration
⚠️
Add test=1 to run tests without real effects. In production, omit this parameter.
Parameters
- test (number (1)) : For testing, add the test=1 parameter. It must be omitted in production.
- regimen (integer) : Scheme, 4 digits. Possible values:
- 0111: General Scheme
- Table of scheme codes (opens in a new tab)
- 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.
- situacion (integer) : Situation number, 2 digits. Possible values:
- 51: Voluntary termination/resignation
- Table of situation type codes (opens in a new tab)
- fecha_real (date) : Deregistration date, format YYYY-MM-DD.
- fecha_vacaciones optional (date) : Holiday date, format YYYY-MM-DD.
- indicativoSAA optional (integer) : Mandatory field on deregistrations for reporting paid holiday, maximum 3 digits.
- duplicate optional (integer) : Get the duplicate PDF as base64 in JSON format in the response; possible values are 1 or null.
- inactividad_z optional (string) : The deregistration situation must be a TERMINATING value and the actual deregistration date must be the same as the actual registration date of the employment relationship. Possible values: S = Yes, N or empty = No
- dias_trabajados optional (integer) : Can only be entered on deregistrations and for certain schemes. For part-time contracts, these are the days worked in the month in which the deregistration takes place.
- fecha_fin_temporal optional (date) : End date for temporary contracts.
- 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.
POST /baja
{
"test": 1,
"regimen": "0111",
"ccc": 12345678901,
"nss": "123456789012",
"identificacion": 1,
"dni": "12345678A",
"situacion": 93,
"fecha_real": "2023-11-01",
"fecha_vacaciones": "2024-07-15",
"indicativoSAA": 123,
"duplicate": 1,
"inactividad_z": "N"
}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"
}
}
}Termination without a duplicate
If Sistema RED accepts the termination but does not return the duplicate, the API looks up that worker's TA on that date. If it finds it, it answers 200 with the TA, like a normal termination. Otherwise it answers 502 with the message "Duplicado no obtenido. Por favor, verifique si la operación se realizó correctamente.": the termination may have gone through, so check before sending it again.