Skip to Content
SEPE

SEPE

Connect your applications to SEPE 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/sepe

Errors

Errors returned by the SEPE API, or validation errors.

  • 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 SEPE or validation errors.
    • sepe: Errors related to SEPE.
    • regimen: Validation errors.
  • maintenance (boolean) : Set when SEPE is under maintenance.
  • retry_after optional (integer) : On 503 with maintenance: true or with retryable: true: the same seconds as the Retry-After header. If it is missing, use the header.
  • retryable optional (boolean) : true on 503 responses where we could not communicate with the authority; retry after Retry-After. It is absent on 424 and on the unknown-outcome 503 of a write.

Response

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

Status codes

The HTTP status tells you whether the query has an answer, whether the problem is in what you sent us, or whether the failure is on the SEPE side. Use it to decide whether retrying is worthwhile.

CodeWhat it meansRetry?
200The operation went through.—
404SEPE answered correctly and there is no data for that query: the worker has no certificates, or there is no document on that date.No. It is a final answer; retrying returns the same.
422The data you sent is not valid, either per our validation or per SEPE itself (a malformed NIF/NIE, for example).No, not until you fix the data.
429You went over the request limit (see Rate limits) or the certificate already has a communication in flight.Yes, waiting for what Retry-After says.
424SEPE answered and rejected the operation for a reason other than the above, or rejected the digital certificate we presented. message starts with SEPE: when it is SEPE’s own text, and the response then carries the X-Saltra-Error: organism-rejected header.No, until the data is fixed (or the certificate is changed).
503 + retryable: trueWe could not communicate with SEPE (connection failure, timeout on a query, invalid response). It carries retry_after in the body and the Retry-After (60 seconds by default) and X-Saltra-Error: organism-unavailable headers.Yes, waiting for what Retry-After says.
503 + maintenance: trueSEPE is under maintenance or not operational (maintenance: true). This includes cases where its server does not answer verifiably. The response carries a Retry-After header with the seconds to wait; retrying earlier returns the same 503.Yes, waiting for what Retry-After says.
503 without Retry-AfterUnknown outcome of a communication (contract, call-up, cancellation…): SEPE did not answer in time or did not confirm, and it may have been registered. No retryable and no Retry-After; timeout: true when time ran out.Not blindly: check first whether it was registered (you could duplicate it).

Until 18/09/2026, empty results (No existen certificados para ese NIF, No se encuentra el documento en esta fecha…) came back as 502. They are 404 now: if your integration treats any 5xx as “retry”, stop repeating queries that will never change.

Until 19/09/2026, some SEPE outages came back as 502 with the message Error de conexión de SALTRA con el (SEPE) and maintenance: false. They are 503 with maintenance: true now, like every other outage on their side. Rely on maintenance, not on the message text: that is the field meant for this and its wording does not change.

Until 26/10/2026, SEPE rejections came back as 502 and timeouts as 504. A rejection is now 424, a failure to communicate is 503 with retryable: true and Retry-After, and a communication with an unknown outcome is 503 without Retry-After. Connection failures such as Error de conexión de SALTRA con el (SEPE) now carry maintenance: false and retryable: true. The API never returns 502 or 504 on purpose any more: if you get one, it is generated by the network infrastructure, not by the API, and does not carry our body. See the changelog of 23/10/2026.

Example 503 (Certific@ under maintenance):

HTTP/1.1 503 Service Unavailable Content-Type: application/json Retry-After: 120
Respuesta 503
{ "success": false, "message": "SEPE: SEPE en mantenimiento.", "status": 503, "errors": { "sepe": ["SEPE: SEPE en mantenimiento."] }, "maintenance": true, "retry_after": 120 }

The Retry-After value depends on the case. When Saltra already knows SEPE is down (Certific@ under maintenance, for example), it answers without asking SEPE again, and Retry-After is the number of seconds until it checks again (up to 300 seconds, 5 minutes). For any other outage it is a default value of a few minutes. On the 503 with retryable: true (we could not communicate with SEPE) it is 60 seconds by default.

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. The maintenance 503 now always carries the Retry-After header and may also include retry_after in the body, with the same value.

Until 14/10/2026, when SEPE’s Certific@ service was unavailable, its endpoints could take about 12 seconds and answer 500 with a “timed out” message. They now answer straight away with 503, maintenance: true, the Retry-After header and the message SEPE: El servicio Certific@ no está disponible en este momento. Inténtalo de nuevo más tarde. While it is still unavailable, subsequent requests also get a 503 immediately. It is not a problem with your certificate or with the data you sent: wait for what Retry-After says and do not retry in a loop.

Rate 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 (if X-Cert-Secret is 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-situations and GET /ta-info-for-nss from Social Security, and GET /contrata/data from 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.

HeaderTypeWhen it is sentWhat it means
X-Ratelimit-LimitintegerAlwaysRequests allowed per minute.
X-Ratelimit-RemainingintegerAlwaysRequests left in the current window.
X-Ratelimit-ResetUNIX timestampAlwaysMoment the window renews and X-Ratelimit-Remaining returns to its maximum.
Retry-AftersecondsOn 429 and on 503 when the authority is under maintenance (maintenance: true) or we could not communicate with it (retryable: true). Never on a 424 or on the unknown-outcome 503 of a write.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: 1786012860

X-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: 37

The 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.

Last updated on