# Person-Credential Official Consistency Check (Mexico)
# 1 Description
This product primarily addresses risk-control problems such as identity impersonation, operation by a third party on the holder's behalf, and fraudulent real-name registration. It is suited to scenarios such as real-name authentication, online account opening, permission activation, and high-risk business processing, achieving a three-in-one ("person, credential, holder") genuine identity check.
Supports Mexican voter card classes "G" and "H".
# 2 Usage
# 2.1 Invoke URL
Singapore: https://api-sgp.yljz.com/finauth/v5/ine/personmatch
Mexico: https://api-mx.yljz.com/finauth/v5/ine/personmatch
# 2.2 Invoke Method
Request method: POST
Request format: form-data
Description: The client generates the encrypted signature sign from the apikey and secret, and passes the back image of the document, a portrait image, and a business serial number. The API returns the person-credential comparison verification result and confidence score.
# 3 Request Parameters
| Parameter | Name | Required | Type | Description |
|---|---|---|---|---|
| sign | Signature | Yes | String | For the signature generation rules, see Authentication. |
| sign_version | Signature algorithm version | Yes | String | Fixed value: hmac_sha1 or hmac_sha256 |
| image_reverse | INE back image | Yes | File | As with the portrait image, a photo taken by the client. Image limits: 1. File size ≤ 5 MB; 2. Resolution ≤ 5000×5000 px; 3. Format: JPG/JPEG/PNG. |
| image_ref | Portrait image | Yes | File | |
| ocr | ocr | Yes | String | The OCR number on the document. |
| cic | cic | Yes | String | The CIC number on the document. |
| curp | curp | No | String | The CURP number on the document. |
| biz_no | Business serial number | No | String | A custom unique serial number for this request. |
# 4 Response Parameters
| Field | Name | Type | Description |
|---|---|---|---|
| code | Return code | String | Returns "0000" on successful comparison. See the return code reference table for details. |
| request_id | Request ID | String | A unique string that identifies each request. This field is always returned except when a 404 (API_NOT_FOUND) or 403 (AUTHORIZATION_ERROR) error occurs. |
| time_used | Time used | Int | The total time taken by the request, in milliseconds. This field is always returned. |
| biz_no | Business serial number | String | The business serial number that was passed in, returned unchanged. |
| verification | Verification result | JSON | Verification result details. |
| --confidence | Comparison score | Float | Example value: 88.038055. Decision rule: a value above 74.39926 is a trusted score; the higher the score, the higher the face comparison confidence. |
| --pat_name | Paternal surname | String | Paternal Surname. |
| --mat_name | Maternal surname | String | Maternal Surname. |
| --given_name | Given name | String | Given Name(s). |
| --gender | Gender | String | M (male, shown on the voter card as: Hombre); F (female, shown on the voter card as: Mujer). |
| --curp | CURP | String | CURP number. |
| --section | Section number | String | Section number (SECCIÓN). |
| --fecha | Registration date | String | Issue date (fecha), year-month-day. |
| --vigencia | Validity period | String | Validity period (vigencia), e.g. 2024-2034. |
| --gov_image | Official portrait | String | Official portrait image, Base64 format, JPG only. |
| --cic | Voter credential number | String | Voter credential number (CIC). |
| --ocr | OCR code | String | OCR recognition code. |
| --entidad_codigo | State code | String | State code (entidad código), e.g. 15. |
| --municipio_codigo | Municipality code | String | Municipality code (municipio código), e.g. 121. |
| --entidad | State name | String | State name (entidad), e.g. Estado de México. |
| --municipio | Municipality name | String | Municipality name (municipio), e.g. Zumpango. |
| --tipo | Document type | String | Document type (tipo), e.g. G. |
# 5 Error Code Reference
| HTTP Status Code | Return Code | Billable | Description |
|---|---|---|---|
| 200 | 0000 | Yes | Comparison consistent. |
| 200 | 0002 | Yes | Person-credential comparison inconsistent. |
| 400 | ERROR:CIC_OCR_CURP | No | The CIC, OCR, or CURP number is incorrect. |
| 400 | ID_CARD_NOT_FOUND | No | No card was detected. |
| 400 | LOW_QUALITY | No | Abnormal card quality. |
| 400 | ID_CARD_UNRECOGNIZABLE | No | The card cannot be recognized. |
| 400 | NO_FACE_FOUND | No | No face was detected. |
| 400 | MULTIPLE_FACES | No | Multiple faces were detected. |
| 400 | MISSING_ARGUMENTS: |
No | A required parameter is missing. |
| 400 | BAD_ARGUMENTS: |
No | A parameter parsing error (for example, a number is required but a non-numeric string is provided, or the length is too long). |
| 400 | IMAGE_ERROR_UNSUPPORTED_FORMAT: | No | The corresponding image cannot be parsed; it may not be an image file or the data may be corrupted. |
| 400 | INVALID_IMAGE_SIZE: | No | The uploaded image is too large; specifically, its pixel width or height exceeds the API's pixel limit. |
| 403 | AUTHENTICATION_ERROR | No | Invalid signature. |
| 403 | AUTHORIZATION_ERROR: |
No | The api_key is disabled, the call limit is exceeded, there is no permission to call this API, or no permission to call this API with the current method. |
| 403 | CONCURRENCY_LIMIT_EXCEEDED | No | The concurrency limit is exceeded. |
| 404 | API_NOT_FOUND | No | The invoked API does not exist. |
| 413 | Request Entity Too Large | No | The request size exceeds the limit. This error is returned as plain text, not JSON. |
| 500 | INTERNAL_ERROR | No | Internal server error. When this error occurs, please retry. If it persists, contact FaceID customer service or business support. |
# 6 Response Example
# 6.1 Passed
{
"code": "0000",
"request_id": "b9c3f6d8-1a5e-4b7d-9f4c-6e8a3c7f9b1d",
"time_used": 1567,
"biz_no": "202608070006",
"positive_appraisal": {
"screen": "0",
"ps": "0",
"aigc": "0",
"watermark": "0"
},
"reverse_appraisal": {
"screen": "0",
"ps": "0",
"aigc": "0",
"watermark": "0"
}
}
# 6.2 PS Detected
{
"code": "0001",
"request_id": "c1d4f7e9-2b6f-4c8e-8a5d-7f9b4d8a1c2e",
"time_used": 1498,
"biz_no": "202608070007",
"positive_appraisal": {
"screen": "0",
"ps": "1",
"aigc": "0",
"watermark": "0"
},
"reverse_appraisal": {
"screen": "0",
"ps": "0",
"aigc": "0",
"watermark": "0"
}
}
# 6.3 Fail Response Example
{
"code": "400",
"request_id": "d2e5a8f1-3c7a-4d9f-9b6e-8a1c5e9b2d3f",
"time_used": 210,
"error": "ID_CARD_NOT_FOUND"
}
