DEHU

DEHU

Connect your applications to DEHU 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/dehu

Errors

Errors returned by the DEHU 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 DEHU or validation errors.
    • dehu: Errors related to DEHU.
    • regimen: Validation errors.
  • maintenance (boolean) : Set when DEHU is under maintenance.

Response

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

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-AftersecondsOnly on 429Seconds 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.

Get statistics

GET /notification-stats
{}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "totalNotReadCommunications": "29",
    "totalPendingNotifications": "78",
    "newDeviceForPushNotify": "0",
    "userHasUnverifiedEmail": "0",
    "userHasNotContact": "0"
  }
}

Search notification status

Parameters (filters)

  • id (integer) : The notification's "identifier" field.
GET /notification-finder
{
  "id": "N259998999"
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "status": 200,
  "data": [
    {
      "type": "notifications/pending",
      "emitterSourceEntity": "Ministerio de Inclusión, Seguridad Social y Migraciones",
      "sentReference": "446dee88a09c99995754f4d68dc7weq3ea3c909873991",
      "state": "PENDIENTE"
    }
  ]
}

Pending notifications

Parameters

  • page (integer) : Current page number, defaults to 1.
  • limit (integer) : Records per request, optional; 50 records by default and as the maximum.
  • titularNif (string) : Holder's NIF, optional.
  • startDate: Start date in Y-m-d format, optional.
  • endDate: End date in Y-m-d format, optional.
GET /notifications-pending
{
  "page": 1,
  "startDate": "2025-01-01",
  "endDate": "2025-01-02"
}

Response

  • sentReference: Notification identifier.
Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "count": 50,
    "total": 51,
    "limit": 50,
    "page": 1,
    "items": [
      {
        "emitterEntity": "Tesoreria General de la Seguridad Social",
        "emitterSourceEntity": "Ministerio de Inclusión, Seguridad Social y Migraciones",
        "nifTitular": "B19994999",
        "sentReference": "446dee88a09c99995754f4d68dc7weq3ea3c909873991",
        "identifier": "N259998999",
        "concept": "REGIMENES SEG. SOCIAL OBLIGADOS A RED / 2101V0999999990999 / PROVIDENCIA DE APREMIO",
        "description": null,
        "postalDelivery": false,
        "availabilityDate": "2025-10-05T00:03:49+02:00",
        "expirationDate": "2025-10-16T23:59:59+02:00",
        "finalDate": null,
        "bondType": "DESTINATARIO",
        "notificationPriority": "NORMAL",
        "unsynchronizedAppearance": null,
        "assuranceLevel": "low"
      }
    ]
  }
}

Completed notifications

Parameters

  • page (integer) : Current page number, defaults to 1.
  • limit (integer) : Records per request, optional; 50 records by default and as the maximum.
  • titularNif (string) : Holder's NIF, optional.
  • startDate: Start date in Y-m-d format, optional.
  • endDate: End date in Y-m-d format, optional.
GET /notifications-done
{
  "page": 1,
  "startDate": "2025-01-01",
  "endDate": "2025-01-02"
}

Response

  • sentReference: Notification identifier.
Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "count": 50,
    "total": 51,
    "limit": 50,
    "page": 1,
    "items": [
      {
        "emitterEntity": "Tesoreria General de la Seguridad Social",
        "emitterSourceEntity": "Ministerio de Inclusión, Seguridad Social y Migraciones",
        "vinculoReceptor": "TITULAR",
        "nifTitular": "B21999999",
        "sentReference": "446dee88a09c99995754f4d68dc7weq3ea3c909873991",
        "state": "ACEPTADA",
        "identifier": "N259993999",
        "concept": "REGIMENES SEG. SOCIAL OBLIGADOS A RED / 2190A4525099999999 / RESOLUCION ALTAS/BAJAS (RED)",
        "postalDelivery": false,
        "availabilityDate": "2025-10-10T01:28:53+02:00",
        "expirationDate": "2025-10-21T23:59:59+02:00",
        "finalDate": "2025-10-10T08:26:02+02:00",
        "bondType": "DESTINATARIO",
        "hasAnnexes": false,
        "notificationPriority": "NORMAL",
        "assuranceLevel": "low"
      }
    ]
  }
}

Communications

Parameters (filters)

  • page (integer) : Current page number, defaults to 1.
  • limit (integer) : Records per request, optional; 50 records by default and as the maximum.
  • titularNif (string) : Holder's NIF, optional.
  • startDate: Start date in Y-m-d format, optional.
  • endDate: End date in Y-m-d format, optional.
GET /communications
{
  "page": 1,
  "startDate": "2025-01-01",
  "endDate": "2025-01-02"
}

Response

  • sentReference: Notification identifier.
Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "count": 50,
    "total": 51,
    "limit": 50,
    "page": 1,
    "items": [
      {
        "emitterEntity": "Tesoreria General de la Seguridad Social",
        "emitterSourceEntity": "Ministerio de Inclusión, Seguridad Social y Migraciones",
        "vinculoReceptor": "",
        "nifTitular": "99936799A",
        "sentReference": "446dee88a09c99995754f4d68dc7weq3ea3c909873991",
        "state": "PENDIENTE",
        "identifier": "C59999999",
        "concept": "REGIMENES SEG. SOCIAL OBLIGADOS A RED / 2101D2999942419999 / COMUNICACIÓN CON DESTINO NACIONAL",
        "postalDelivery": false,
        "availabilityDate": "2025-10-09T00:02:48+02:00",
        "finalDate": null,
        "document": [],
        "bondType": "DESTINATARIO",
        "hasAnnexes": false
      }
    ]
  }
}

Get details of a completed notification

Parameters (filters)

  • id (string) : Notification identifier (sentReference).
  • duplicate (number) : Optional. Retrieves the document "content" as base64 if available.
  • voucher (number) : Optional. Retrieves the receipt "content" as base64 if available.
GET /notification-done
{
  "id": "446dee88a09c99995754f4d68dc7weq3ea3c909873991"
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "emitterEntity": "Tesoreria General de la Seguridad Social",
    "emitterSourceEntity": "Ministerio de Inclusión, Seguridad Social y Migraciones",
    "nifReceptor": "99999962X",
    "nameReceptor": "JOSE JUAN PEREZ",
    "receiver": {
      "nif": "99999962X",
      "name": "JOSE JUAN PEREZ",
      "dir3Code": null,
      "direCode": null
    },
    "nifTitular": "B99999999",
    "dir3Code": null,
    "direCode": null,
    "cantAnnexes": 0,
    "sentReference": "446dee88a09c99995754f4d68dc7weq3ea3c909873991",
    "state": "ACEPTADA",
    "identifier": "N999609999",
    "concept": "REGIMENES SEG. SOCIAL OBLIGADOS A RED / 99999999904 / RECLAMACIÓN DE DEUDA",
    "description": null,
    "availabilityDate": "2025-10-01T01:37:22+02:00",
    "expirationDate": "2025-10-12T23:59:59+02:00",
    "finalDate": "2025-10-01T10:29:32+02:00",
    "document": {
      "publicMetadata": null,
      "privateMetadata": null,
      "documentLink": null,
      "name": "SINT_FGDE_999999999.pdf",
      "mimeType": "application/pdf",
      "content": null
    },
    "bondType": "DESTINATARIO",
    "unsuccessfulState": null,
    "hasAnnexes": false,
    "siaCode": "2997999",
    "siaDenomination": "NOTIFICACIONES ELECTRÓNICAS TGSS",
    "voucher": {
      "mimeType": "application/pdf",
      "name": "Resguardo_xxx.pdf",
      "enabled": true,
      "content": null
    }
  }
}

Get a duplicate of a notification

Parameters (filters)

  • id (string) : Notification identifier (sentReference).
GET /notification-document
{
  "id": "446dee88a09c99995754f4d68dc7weq3ea3c909873991"
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "content": "base64",
    "name": "SINT_FGDE_999999999.pdf",
    "mimeType": "application/pdf",
    "contentType": "application/pdf",
    "privateMetadata": null
  }
}

Get the receipt of a notification

Parameters (filters)

  • id (string) : Notification identifier (sentReference).
GET /notification-voucher
{
  "id": "446dee88a09c99995754f4d68dc7weq3ea3c909873991"
}

Response

Respuesta
{
  "success": true,
  "message": "OK",
  "data": {
    "content": "base64",
    "name": "Resguardo_1xxbbb9x.pdf",
    "mimeType": "application/pdf",
    "contentType": "application/pdf",
    "enabled": true
  }
}