heruAPI
Social security (IMSS)

Get a social security validation

LiveServed by the v1 API in development with the same checks as production; production opens on the same contract. The capabilities from before v1 keep running in production at the path your account team gives you.

GET
/social-security-validations/{id}

Returns the validation. Once it completes, result carries the NSS and the person's data; when it fails, code and message say why.

Needs the social_security_validations:read scope.

Authorization

oauth2 social_security_validations:read
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.

Scope: social_security_validations:read

Path parameters

id*string

The social security validation id.

Match^ssv_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response body

OK

application/json
  1. response
id*string
Match^ssv_[0-7][0-9a-hjkmnp-tv-z]{25}$
external_id*string

Your own id for this person, merchant or record. Echoed back in every response and webhook.

Lengthlength <= 128
status*string

received when heru accepts the request, processing while it queries the IMSS (and while a registration started with register_if_missing is in progress), then completed or failed. completed means the IMSS answered, even when the answer is that the person has no NSS or must go in person: code says so. failed means heru could not finish after every retry.

Value in"received""processing""completed""failed"
code?string

What the IMSS answered when it is not an NSS, or why the validation failed. Absent when the NSS was found. With completed: IN_PERSON_VALIDATION_REQUIRED the IMSS asks the person to go to their subdelegación; REGISTRATION_REQUIRED the person has no NSS, validate again with register_if_missing; CURP_NOT_FOUND the CURP is not registered with RENAPO. With failed: RETRIES_EXHAUSTED, the IMSS did not answer after every retry. See validation results.

Value in"CURP_NOT_FOUND""REGISTRATION_REQUIRED""IN_PERSON_VALIDATION_REQUIRED""RETRIES_EXHAUSTED"
message?|null
result?|

Present once the validation finishes. Absent while it is processing. Null when there is no NSS to return.

created_at?string
Formatdate-time
updated_at?string
Formatdate-time
curl -X GET 'https://api.dev.b2b.heru.app/v1/social-security-validations/ssv_01m4ra8vtnepvrtmxdf6v3atq2'

{  "id": "ssv_01m4ra8vtnepvrtmxdf6v3atq2",  "external_id": "SSV-2026-001213",  "status": "completed",  "message": null,  "result": {    "curp": "HEGL900101HDFRRS06",    "nss": "00000000011",    "name": "JOSE LUIS HERNANDEZ GARCIA",    "given_names": "JOSE LUIS",    "first_surname": "HERNANDEZ",    "second_surname": "GARCIA",    "sex": "H",    "birth_date": "1990-01-01",    "birth_state": "NE",    "documents": {      "nss_proof": {        "url": "https://download.heru.app/nss-proofs/ssv_01m4ra8vtnepvrtmxdf6v3atq2.pdf?expires=…&signature=…",        "expires_at": "2026-10-13T15:06:10Z",        "content_type": "application/pdf",        "filename": "constancia-nss.pdf"      },      "nss_card": {        "url": "https://download.heru.app/nss-cards/ssv_01m4ra8vtnepvrtmxdf6v3atq2.pdf?expires=…&signature=…",        "expires_at": "2026-10-13T15:06:10Z",        "content_type": "application/pdf",        "filename": "tarjeta-nss.pdf"      }    }  },  "created_at": "2026-10-12T15:04:05.205Z",  "updated_at": "2026-10-12T15:06:10.293Z"}

© 2026 Kuarto Inc. (heru)heru.appQuestions about your integration? Contact your heru account team.