Navarre Tax Office
Connect your applications to the tax certificates issued by the Hacienda Foral de Navarra (Navarre regional tax office).
HTTP header parameters
- Authorization (string): API authorisation. Example:
Bearer {token} - X-Cert-Secret (string) : Secret key associated with the client certificate.
The Navarre Tax Office is accessed with the AEAT certificate (type 3), the same one you use for the AEAT endpoints. Send that certificate's key in X-Cert-Secret.
Base URL
https://api.saltra.es/api/v4/navarraErrors
Errors returned by the Navarre Tax Office, 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 the Navarre Tax Office or validation errors.
- navarra: Errors related to the Navarre Tax Office.
- nif, representation, type: Validation errors.
- maintenance (boolean) : Set when the Navarre Tax Office is under maintenance.
Status codes
| Status | When |
|---|---|
422 | Validation error: nif is missing on a request made on behalf of someone, nif is longer than 9 characters, or type is not one of the accepted values. |
502 | The Navarre Tax Office could not issue the certificate. For example, the certificate holder is not registered as representative of the given nif, or the tax office returns its error PDF ("SE PRODUJO UN ERROR EN EL PROCESO… No es posible tramitar su Certificado"). The details are in errors.navarra. |
503 | The Navarre Tax Office is not responding or is under maintenance (maintenance: true). |
Response
Navarre Tax Office error (502):
{
"success": false,
"message": "Hacienda de Navarra no ha validado la representación del NIF B31000000.",
"status": 502,
"data": [],
"errors": {
"navarra": [
"Hacienda de Navarra no ha validado la representación del NIF B31000000."
]
}
}Validation error (422):
{
"success": false,
"message": "validation_errors",
"status": 422,
"data": [],
"errors": {
"nif": ["El campo NIF es obligatorio si se solicita en representación."]
}
}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 | Only on 429 | 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.
Certificate of being up to date with tax obligations
GET /report-corriente— Certificate of being up to date with tax obligations at the Hacienda Foral de Navarra. Returns the PDF issued by the tax office and, when it can be read, whether its result is positive or negative.
Parameters
- representation (boolean) : Optional.
true(default) to request the certificate on behalf of the givennif;falseto request it in the holder's own name (the holder of the digital certificate). - nif (string) : NIF/CIF of the represented person or company, 9 characters at most. Mandatory when requesting on behalf of someone; if omitted, the CIF of the authenticated user's company is used. Ignored with
representation=false. - type (string) : Optional. Certificate to request. Possible values:
- EstarAlCorriente: Being up to date with tax obligations. Default value.
- DeudasPorNif: Certificate of debts for the NIF.
- EstarAlCorrienteContratistas: Being up to date with tax obligations for contractors and subcontractors.
To request it on behalf of someone, the holder of the digital certificate must be registered at the Navarre Tax Office as representative of the given nif. Otherwise the API answers 502 with the reason in errors.navarra.
{
"representation": true,
"nif": "B31000000",
"type": "EstarAlCorriente"
}curl -G "https://api.saltra.es/api/v4/navarra/report-corriente" \
-H "Authorization: Bearer {token}" \
-H "X-Cert-Secret: {cert_secret}" \
-H "Accept: application/json" \
--data-urlencode "nif=B31000000"Response parameters
- data.result (string) : Result of the certificate:
positive(up to date),negative(not up to date) ornullif it could not be determined from the PDF. - data.file (object) : The certificate as a PDF.
- contentType (string) :
application/pdf. - name (string) : File name.
- content (string) : The PDF as base64.
- contentType (string) :
Response
{
"success": true,
"message": "OK",
"status": 200,
"data": {
"result": "positive",
"file": {
"contentType": "application/pdf",
"name": "document.pdf",
"content": "base64"
}
}
}