Duplicates of TA documents (registrations, deregistrations and variations)
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
- regimen (integer) : Scheme, 4 digits. Possible values:
- 0111: General Scheme
- Table of scheme codes
- ccc (integer) : Contribution account code, 11 digits.
- nss (integer) : Social Security number, 12 digits.
- startDate (date) : Contract start date, format YYYY-MM-DD. Mandatory, also with
indice: TGSS lists the movements from that date onwards, so it narrows the search to the contract. - indice optional (integer) : Integer greater than or equal to 1. It is the
indiceof a row returned by Get the TA list. If sent, the TA of that row is downloaded, whether it is a registration, a deregistration or a variation (for example, “CAMBIO DE CONTRATO”). - movType optional (string) : Movement type. Possible values:
- ALTA
- BAJA
{
"regimen": "0111",
"ccc": "12345678901",
"nss": "123456789011",
"startDate": "2023-01-01",
"movType": "ALTA"
}Duplicate of a variation
Variations (contract changes, working-hours changes, etc.) cannot be requested with movType, which only accepts ALTA or BAJA. To get their TA:
- Call
GET /ta-info-for-nsswithregimen,ccc,nssandstartDate(the contract start date). - Take the
indiceof the row you want to duplicate. - Call
GET /duplicate-tawithregimen,ccc,nss, the samestartDateandindice.
The indice is unique across the whole list (the second page starts at 13), but it is numbered over the list already filtered by startDate: with another date, the same row gets another indice. That is why the same contract start date must be sent in both calls. In the example, the row with indice 2 in the list is a “CAMBIO DE CONTRATO” and the PDF of that change is downloaded.
{
"regimen": "0111",
"ccc": "12345678901",
"nss": "123456789011",
"startDate": "2023-01-16",
"indice": 2
}Response
- data (array) : every movement for the requested NAF.
- employee (object) : the worker shown by the TGSS in the screen header:
name,identity,docandnss. - movement (object) : the specific movement the PDF was taken from. Use it to check the TA is the one you asked for (same date, same type) and not another movement of the same worker.
- file (object) : the TA document as a PDF.
{
"success": true,
"message": "OK",
"data": {
"data": [
{
"indice": 1,
"documentoTA": "ALTA (SIT.ACTUAL)",
"date": "2023-01-01",
"st": "01",
"gc": "02",
"contractType": "200",
"coeficiente": "0,500"
}
],
"employee": {
"name": "NOMBRE APELLIDO APELLIDO",
"identity": "DNI",
"doc": "043468731L",
"nss": "081524252915"
},
"movement": {
"indice": 1,
"documentoTA": "ALTA (SIT.ACTUAL)",
"date": "2023-01-01",
"st": "01",
"gc": "02",
"contractType": "200",
"coeficiente": "0,500"
},
"file": {
"contentType": "application/pdf",
"name": "document.pdf",
"content": "base64"
}
}
}