秘鲁身份证OCR
身份证号码 + 姓名识别
代码示例:
识别成功的响应
识别失败的响应
输入图像不是身份证的响应
无法识别的卡类型的响应
无效请求参数的响应
图像格式无效的响应
图像大小超过 2M 的响应
服务器错误的响应
HTTP 请求
POST https://api.ekycpro.com/v1/pe_ocr/general
请求参数
参数 | 描述 |
---|---|
img | string ,base64 编码的图像。建议图像大小小于 200KB,以便在 2 秒内返回结果,否则返回时间会更长。 |
响应格式
字段 | 描述 |
---|---|
status | 状态码 |
message | CardNumber :身份证号码, |
DateOfBirth :出生日期, | |
PlaceOfBirthNo :出生地编号, | |
ForeNames :名字, | |
Surname :姓氏, | |
SecondSurname :第二姓氏, | |
dateOfExpiry :过期日期, | |
dateOfIssue :发证日期, | |
dateOfRegister :注册日期, | |
gender :性别, | |
maritalStatus :婚姻状况, | |
nationality :国籍 |
状态码
状态码 | 描述 |
---|---|
OK | 收费 ,成功 |
FAIL | 收费 ,图像识别错误,请检查输入图像 |
INVALID_REQUEST | 免费 ,无效的请求参数 |
IMAGE_INVALID_FORMAT | 免费 ,无效的图像格式,图像格式应为 jpeg/jpg/png/bmp 之一 |
IMAGE_INVALID_SIZE | 免费 ,图像大小无效,应小于 2M |
INNER_ERROR | 免费 ,服务器错误 |