Report call-ups
Parameters
- cif (string) : Company CIF.
- regimen (integer) : Scheme, 4 digits. Possible values:
- 0111: General Scheme
- Table of scheme codes (opens in a new tab)
- ccc (string) : Contribution account code, 11 digits.
- duplicate optional (integer) : Get the PDF as base64 in JSON format in the response; possible values 1 or null.
- employees (array) : Worker details. Between 1 and 10 per request; each one is confirmed separately with SEPE.
- doc (string) : Identifier of the natural person.
- docType (string) : Document type. Possible values:
- D: NIF/DNI,
- E: NIE,
- U: EU citizen,
- W: Passport.
- name (string) : Employee's first name.
- surname (string) : Employee's first surname.
- lastSurname (string) : Employee's second surname, mandatory for a NIF/DNI.
- nss (integer) : Social Security number, 12 digits.
- sex (integer) : Possible values:
- 1 = Male
- 2 = Female
- dateOfBirth (date) : Date of birth, format YYYY-MM-DD.
- nationality (integer) : Employee's nationality. Possible values:
- municipality (integer) : Employee's municipality. Possible values:
- 13044: Fuente el Fresno
- Table of municipality codes (opens in a new tab)
- country (integer) : Employee's country of residence. Possible values:
- 724: Spain
- Table of country codes (opens in a new tab)
- nss (integer) : Social Security number, 12 digits.
- startDate (date) : Start date, format YYYY-MM-DD.
- endDate optional (date) : End date, format YYYY-MM-DD.
- occupation (integer) : National Classification of Occupations (CNO), 4 digits. Possible values:
- 0011: Armed forces officers
- Table of occupation codes (opens in a new tab)
- nivelFormativo (integer) : Educational level, 2 digits.
- question optional (string) : Whether they are joining the activity. Possible values:
- S = Yes.
- N = No.
- sepeId optional (string) : Contract identifier at SEPE, format E-99-9999-9999999.
{
"cif": "9999999B",
"regimen": "0112",
"ccc": "27770999999",
"employees": [
{
"doc": "9999999B",
"startDate": "2023-11-05",
"endDate": "2023-11-05",
"nivelFormativo": 12,
"question": "S"
}
]
}Response
{
"success": true,
"message": "OK",
"data": {
"send": 1,
"not_send": 0,
"data": [
{
"success": true,
"doc": "9999999B",
"id": " E-28-2024-9906993",
"file": {
"contentType": "application/pdf",
"name": "document.pdf",
"content": "base64"
}
}
]
}
}Errors
A call-up can fail in two ways, told apart by where the detail comes: in
errorsor insidedata.data.
Validation errors
The data does not pass Saltra's validation and SEPE is never contacted: no
worker in the request is reported. Responds 422.
- message (string) : Every error on one line, separated by
|. - errors (object) : The detail field by field. The key carries the
worker's position within
employeesstarting at 0, soemployees.1.nssis thenssof the second worker you sent. The text numbers the worker starting at 1 ("empleado n# 2").
{
"success": false,
"message": "Hubo un error al enviar la comunicación. El campo NSS del empleado n# 1 debe ser de 12 dígitos. | El campo Nivel formativo n# 2 es obligatorio.",
"status": 422,
"errors": {
"employees.0.nss": [
"El campo NSS del empleado n# 1 debe ser de 12 dígitos."
],
"employees.1.nivelFormativo": [
"El campo Nivel formativo n# 2 es obligatorio."
]
}
}Rejections from SEPE
The request reaches SEPE and it is SEPE that rejects the worker: duplicate
call-up, educational level incompatible with the CNO, a contract that is not
permanent-seasonal, data that does not match theirs… Here the detail does not
come in errors but in each element of data.data, because every worker is
confirmed separately:
- data.send / data.not_send (integer) : How many were reported and how many were not.
- data.data[].success (boolean) : Result for that worker.
- data.data[].doc (string) : Their identifier, to match it with the one you sent.
- data.data[].message (string) : Why it was not reported. Almost always the text SEPE rejects them with; it can also be a validation error for that worker, when SEPE does not have them in its database and data is missing to create them (
name,surname,sex,dateOfBirth,nationality,municipality,country).
One request takes up to 10 workers, so success can be partial: success
is true as soon as at least one is reported. Always check
data.not_send and each worker's success, not just the top-level
success.
{
"success": true,
"message": "1 Comunicacion/es enviadas con éxito. Y 1 fallidas.",
"status": 200,
"data": {
"send": 1,
"not_send": 1,
"data": [
{
"success": true,
"doc": "9999999B",
"id": "E-28-2024-9906993"
},
{
"success": false,
"doc": "8888888A",
"message": "SEPE: 1. Existe un llamamiento con los mismos datos que el que intenta mecanizar. No se acepta la comunicación."
}
]
}
}If the rejection hits the whole request rather than one worker (SEPE outside
its opening hours, the agency not authorised for that CIF, maintenance) the
message arrives in message and errors.sepe, with status 502.