1、接口说明
(注:调用图片为base64流接口时传参数img,调用图片为file格式接口传参数file)
2、请求参数
序号 |
名称 |
类型 |
必填 |
说明 |
1 |
img |
String |
是 |
上传的文件(图片的base64流) 300kb最佳 |
2 |
file |
MultipartFile |
是 |
上传的文件(上传文件的字段名必须是“file”) |
3 |
key |
String |
是 |
用户ocrKey |
4 |
secret |
String |
是 |
用户ocrSecrert |
5 |
typeId |
Integer |
是 |
识别类型(结婚证46、离婚证47) |
6 |
outvalue |
String |
是 |
输出选项(0为全部返回) |
7 |
format |
String |
是 |
返回格式(xml或者json),如果format为空,则默认返回xml |
3、结果示例
(1)结婚证
{
"message": {
"status": 2,
"value": "识别完成"
},
"cardsinfo": [
{
"type": "46",
"items": [
{"nID": null, "index": null, "desc": "持证人", "content": ""},
{"nID": null, "index": null, "desc": "登记日期", "content": ""},
{"nID": null, "index": null, "desc": "结婚证字号", "content": ""},
{"nID": null, "index": null, "desc": "持证人姓名", "content": ""},
{"nID": null, "index": null, "desc": "持证人性别", "content": ""},
{"nID": null, "index": null, "desc": "持证人国籍", "content": ""},
{"nID": null, "index": null, "desc": "持证人出生日期", "content": ""},
{"nID": null, "index": null, "desc": "持证人身份证件号", "content": ""},
{"nID": null, "index": null, "desc": "对方姓名", "content": ""},
{"nID": null, "index": null, "desc": "对方性别", "content": ""},
{"nID": null, "index": null, "desc": "对方国籍", "content": ""},
{"nID": null, "index": null, "desc": "对方出生日期", "content": ""},
{"nID": null, "index": null, "desc": "对方身份证件号", "content": ""}
]
}
]
}
(2)离婚证
{
"message": {
"status": 2,
"value": "识别完成"
},
"cardsinfo": [
{
"type": "47",
"items": [
{"nID": null, "index": null, "desc": "持证人", "content": ""},
{"nID": null, "index": null, "desc": "登记日期", "content": ""},
{"nID": null, "index": null, "desc": "离婚证字号", "content": ""},
{"nID": null, "index": null, "desc": "持证人姓名", "content": ""},
{"nID": null, "index": null, "desc": "持证人性别", "content": ""},
{"nID": null, "index": null, "desc": "持证人国籍", "content": ""},
{"nID": null, "index": null, "desc": "持证人出生日期", "content": ""},
{"nID": null, "index": null, "desc": "持证人身份证件号", "content": ""},
{"nID": null, "index": null, "desc": "对方姓名", "content": "**"},
{"nID": null, "index": null, "desc": "对方性别", "content": "女"},
{"nID": null, "index": null, "desc": "对方国籍", "content": "中国"},
{"nID": null, "index": null, "desc": "对方出生日期", "content": "1995年*月*日"},
{"nID": null, "index": null, "desc": "对方身份证件号", "content": ""}
]
}
]
}