# Voter Card Verification (Mexico)
# 1 Description
This product primarily addresses risks such as document forgery, document splicing (compositing), information tampering, and front/back mismatch. It is suited to customer scenarios with high compliance and high risk-control requirements, such as document filing, material review, and onboarding verification, providing the ability to check the authenticity and integrity of the document itself.
Supported document types: classes "E", "F", "G", and "H".
# 2 Usage
# 2.1 Invoke URL
Singapore: https://api-sgp.yljz.com/finauth/v5/ine/cardmatch
Mexico: https://api-mx.yljz.com/finauth/v5/ine/cardmatch
# 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 front and back images of the card along with a business serial number. The API returns the card recognition and comparison verification result.
# 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_positive | Front image | Yes | File | Common specification for front and back images: photos of the card front and back taken by the client. Image limits: 1. File size ≤ 5 MB; 2. Resolution ≤ 5000×5000 px; 3. Format: JPG/JPEG/PNG. |
| image_reverse | Back image | Yes | File | |
| 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. |
# 5 Error Code Reference
| HTTP Status Code | Return Code | Billable | Description |
|---|---|---|---|
| 200 | 0000 | Yes | Verification passed. |
| 200 | 0001 | Yes | Text suspected of information forgery. |
| 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 | 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 Person Matched
{
"code": "0000",
"request_id": "e3f6b9c2-4d8a-4e1f-9c7b-2a4d6f8c3e5a",
"time_used": 1823,
"biz_no": "202608070008",
"verification": {
"confidence": 88.038055,
"pat_name": "GOMEZ",
"mat_name": "VELAQUEZ",
"given_name": "MARGARITA",
"gender": "M",
"curp": "GOVM800705MCLMLR01",
"section": "747",
"fecha": "2008-02-01",
"vigencia": "2024-2034",
"gov_image": "/9j/4AAQSkZJRgABAQA...(Base64, jpg type official image)",
"cic": "074711637",
"ocr": "0747116375842",
"entidad_codigo": "15",
"municipio_codigo": "121",
"entidad": "Mexico",
"municipio": "Zumpango",
"tipo": "G"
}
}
# 6.2 Failed Response Example
{
"code": "400",
"request_id": "a5b8d2e4-6f1c-4a3e-9e7d-4c6f8b1e5a7c",
"time_used": 320,
"error": "ERROR:CIC_OCR_CURP"
}
