webhook object and we deliver the result to your URL when it is ready.
How it works
- Create the request.
POSTthe query together with awebhookobject. The API answers right away withtype: ACCEPTEDand atransactionId. Accepting a request is free (billable: false). - Receive the result. When the query resolves, we send an HTTP
POSTto yourwebhook.url. The body is the standard envelope, with the sametransactionIdreturned in step 1.
INVALID_REQUEST right away instead of ACCEPTED, and it is never charged:
The webhook object
Your webhook endpoint
- It receives an HTTP
POSTwith a JSON body (Content-Type: application/json) and the headers you configured. - Answer with any
2xxstatus as soon as you receive the body, and process it afterwards. - Make it idempotent: the same result may be delivered more than once, so use
transactionIdto de-duplicate.
Delivery attempts
We try to deliver each result up to 3 times: right away, then 1 minute and 5 minutes after the previous failed attempt. An attempt fails when your endpoint does not answer with a2xx status within 10 seconds (redirects are not followed). After the third failed attempt the result is not sent again.
Keeping your webhook endpoint available is your responsibility: credits are charged when the result resolves, whether or not your endpoint receives it. For Contribution Weeks you can still fetch the result for 24 hours (see Contribution Weeks fallback).
Billing
Credits are charged once, when the result resolves, under the same rule as every other endpoint (see Credits):billable: true when the query was performed — even if the outcome is negative, such as CURP_NOT_FOUND — and false for technical failures. The billable field of the body your webhook receives tells you which applies.
Results by service
Each asynchronous endpoint delivers one of the following results to your webhook. Open a type to see its full example.Get NSS (Async)
Same result types as Get NSS, exceptINVALID_REQUEST, which is returned immediately when you create the request.
SUCCESS
NSS found
SUCCESS
NSS found
PERSON_WITHOUT_NSS
Person has no NSS assigned
PERSON_WITHOUT_NSS
Person has no NSS assigned
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
CURP_NOT_FOUND
CURP not found
CURP_NOT_FOUND
CURP not found
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS service is currently unavailable
IMSS service is currently unavailable
INTERNAL_ERROR
Unexpected internal error
INTERNAL_ERROR
Unexpected internal error
Employment Status (Async)
Same result types anddata as Employment Status, except INVALID_REQUEST, which is returned immediately when you create the request. MISMATCH_CURP_NSS only happens when you send nss, and data.files[] is only included with includePdf: true (the PDF content is shortened in the example).
SUCCESS
Active employment found
SUCCESS
Active employment found
SUCCESS (includePdf: true)
Active employment found — with the official PDF in data.files[]
SUCCESS (includePdf: true)
Active employment found — with the official PDF in data.files[]
INACTIVE_EMPLOYMENT
No active employment found
INACTIVE_EMPLOYMENT
No active employment found
MISMATCH_CURP_NSS
CURP and NSS do not match
MISMATCH_CURP_NSS
CURP and NSS do not match
CURP_NOT_FOUND
CURP not found in IMSS
CURP_NOT_FOUND
CURP not found in IMSS
PERSON_WITHOUT_NSS
Person exists at IMSS but has no own NSS assigned
PERSON_WITHOUT_NSS
Person exists at IMSS but has no own NSS assigned
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS service is currently unavailable
IMSS service is currently unavailable
INTERNAL_ERROR
Unexpected internal error
INTERNAL_ERROR
Unexpected internal error
Contribution Weeks
How to readdata (SUCCESS and INACTIVE_EMPLOYMENT):
- Official fields, taken from the IMSS document:
nss,personalInfo,contributionWeeks(total=contributed−discounted+reinstated),employmentHistory(one row per job, newest first) andreportDetails(folio,issueDate,digitalSeal, …).files[0]is the official PDF in base64 (shortened in the examples). - The active job is the
employmentHistoryrow withendDate: null; inINACTIVE_EMPLOYMENTthere is none. - Everything computed lives in
derivedSignals—currentStatus,jobTenure(months),stability,salaryandsalaryTimeline. They are facts, not a credit score. - Salaries (
baseSalary,*Salary) are the daily base contribution salary (SBC); the monthly equivalent is SBC × 30.44.salaryAtLegalCap: truemeans the salary hit the legal cap (25 UMA), so real income may be higher. - Every field is always present; values that do not apply are
null.
SUCCESS
Active employment found
SUCCESS
Active employment found
INACTIVE_EMPLOYMENT
No active employment found
INACTIVE_EMPLOYMENT
No active employment found
CURP_NOT_FOUND
CURP not found in IMSS
CURP_NOT_FOUND
CURP not found in IMSS
PERSON_WITHOUT_NSS
Person has no NSS assigned
PERSON_WITHOUT_NSS
Person has no NSS assigned
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
IMSS_INCONSISTENT_DATA
CURP exists but associated data is inconsistent at IMSS
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS_OPERATION_LIMIT
IMSS daily limit reached
IMSS service is currently unavailable
IMSS service is currently unavailable
INTERNAL_ERROR
Unexpected internal error
INTERNAL_ERROR
Unexpected internal error
IMSS could not generate the report for this record
IMSS could not generate the report for this record
IMSS_RECORD_ERROR
Unexpected IMSS error for this record
IMSS_RECORD_ERROR
Unexpected IMSS error for this record
IMSS_REPORT_UNAVAILABLE and IMSS_RECORD_ERROR are specific to that record while the service is working; they are not charged and the same CURP can be submitted again on a later day.
Contribution Weeks fallback
If your webhook could not receive a Contribution Weeks result, fetch it for 24 hours with Contribution Weeks Result (free), sending thetransactionId:
RESULT_FOUND (with the original result envelope inside data), RESULT_PENDING or RESULT_EXPIRED. Use it only as a fallback: the result is always sent to your webhook.