Social Security
Connect your applications to Social Security services.
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-socialErrors
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.
- retry_after (integer) : Optional. Only on
503withmaintenance: true: the same seconds as theRetry-Afterheader. If it is missing, use the header.
Response
{
"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
}Maintenance
When Social Security or the RED System is under maintenance or not operational, the API responds 503 with maintenance: true and a Retry-After header with the seconds to wait. Retrying earlier returns the same 503.
HTTP/1.1 503 Service Unavailable
Content-Type: application/json
Retry-After: 300{
"success": false,
"message": "SISTEMA RED: No operativo o en mantenimiento, inténtelo de nuevo más tarde.",
"status": 503,
"errors": {
"tgss": ["SISTEMA RED: No operativo o en mantenimiento, inténtelo de nuevo más tarde."]
},
"maintenance": true,
"retry_after": 300
}Wait the number of seconds given by Retry-After before retrying. Retrying early does not unblock anything: it returns the same 503. Do not poll at a fixed interval (every 10 seconds, for example).
Until 04/10/2026, the 503 did not say how long to wait. It now always carries the Retry-After header and may also include retry_after in the body, with the same value.
Limits
Authenticated requests are limited to 80 per minute for reads (
GET) and 120 per minute for writes (POST). The limit is counted per certificate (ifX-Cert-Secretis sent) or, failing that, per authenticated user, and per route. Unauthenticated requests are limited to 60 per minute per IP. The heavy-integration endpoints —GET /employee-situationsandGET /ta-info-for-nssfrom Social Security, andGET /contrata/datafrom SEPE— share a lower combined quota of 30 requests per minute per certificate (or user): using one reduces the quota of the other two.
Saltra reports your quota status in the headers of every response, so you can pace your calls before running out.
| Header | Type | When it is sent | What it means |
|---|---|---|---|
X-Ratelimit-Limit | integer | Always | Requests allowed per minute. |
X-Ratelimit-Remaining | integer | Always | Requests left in the current window. |
X-Ratelimit-Reset | UNIX timestamp | Always | Moment the window renews and X-Ratelimit-Remaining returns to its maximum. |
Retry-After | seconds | On 429 and on 503 when the authority is not operational (SEPE, TGSS) | Seconds to wait before retrying. |
Example of a successful response:
HTTP/1.1 200 OK
X-Ratelimit-Limit: 80
X-Ratelimit-Remaining: 45
X-Ratelimit-Reset: 1786012860X-Ratelimit-Reset is an absolute instant, not a countdown: it stays the same across every response in the same window and only moves forward when the quota renews. Combined with X-Ratelimit-Remaining, it is what lets you space out requests as you approach the limit instead of stopping dead.
Once the limit is exceeded, the API responds 429 Too Many Requests and adds Retry-After:
HTTP/1.1 429 Too Many Requests
X-Ratelimit-Limit: 80
X-Ratelimit-Remaining: 0
X-Ratelimit-Reset: 1786012860
Retry-After: 37The body follows the usual error format:
{
"success": false,
"status": 429,
"message": "Too Many Requests"
}Wait the number of seconds given by Retry-After before retrying. Retrying early does not unblock you sooner: it consumes more quota and lengthens the wait.