1、接口说明

接口地址
图片为base64流 https://netocr.com/api/recog_cszm.do
图片为file格式 https://netocr.com/api/recog_cszm_stream.do
接口调用方法 post

(注:调用图片为base64流接口时传参数img,调用图片为file格式接口传参数file)

2、请求参数

序号 名称 类型 必填 说明
1 img String 上传的文件(图片的base64流)
2 file MultipartFile 上传的文件(上传文件的字段名必须是“file”)
3 key String 用户ocrKey
4 secret String 用户ocrSecrert
5 typeId Integer 识别类型:45
6 format String 返回格式(xml或者json),如果format为空,则默认返回xml

3、结果示例

{
    "message": {
        "status": 2,
        "value": "识别完成"
    },
    "cardsinfo": [
        {
            "type": "45",
            "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": ""},
                {"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": ""}
            ]
        }
    ]
}

results matching ""

    No results matching ""