产品详情
API参数 户口本识别 调用地址: http,https://booklet.api.bdymkt.com/booklet 请求方式: POST 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query) 请求参数(Body)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- baseFile
- string
- false
- base64位图片字符串(必填)
- --
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>api-explorer-sdk</artifactId>
<version>1.0.0</version>
</dependency>
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;
// 户口本识别 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "http://gwgp-jjm4uyhjuf2.n.bdcloudapi.com/booklet";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"status": "OK",
"data": [{
"AreaName": "姓名",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "杨舂山",
"Key": "姓名"
}
}, {
"AreaName": "户主或与户主关系",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "之父亲",
"Key": "户主或与户主关系"
}
}, {
"AreaName": "曾用名",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": [],
"Key": "曾用名"
}
}, {
"AreaName": "性别",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "男",
"Key": "性别"
}
}, {
"AreaName": "出生地",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "黑龙江省哈尔滨市",
"Key": "出生地"
}
}, {
"AreaName": "民族",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "汉",
"Key": "民族"
}
}, {
"AreaName": "籍贯",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "湖北省广济县",
"Key": "籍贯"
}
}, {
"AreaName": "出生日期",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "1949年04月01日",
"Key": "出生日期"
}
}, {
"AreaName": "本市(县)其他住址",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": [],
"Key": "本市(县)其他住址"
}
}, {
"AreaName": "宗教信仰",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": [],
"Key": "宗教信仰"
}
}, {
"AreaName": "公民身份证件编号",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "230106194904010418",
"Key": "公民身份证件编号"
}
}, {
"AreaName": "身高",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "171",
"Key": "身高"
}
}, {
"AreaName": "血型",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "B型",
"Key": "血型"
}
}, {
"AreaName": "文化程度",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "初中",
"Key": "文化程度"
}
}, {
"AreaName": "婚姻状况",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "有配偶",
"Key": "婚姻状况"
}
}, {
"AreaName": "兵役状况",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": [],
"Key": "兵役状况"
}
}, {
"AreaName": "服务处所",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "哈尔滨扎钢厂",
"Key": "服务处所"
}
}, {
"AreaName": "职业",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "退休",
"Key": "职业"
}
}, {
"AreaName": "何时由何地迁来本市(县)",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "2003年12月8日 黑孝裣晗尔滨币香筠箧么蚁祜2’夸",
"Key": "何时由何地迁来本市(县)"
}
}, {
"AreaName": "何时由何地迁来本址",
"Type": "1",
"NumCol": "1",
"childs": {
"Text": "2005年4月25 日 西城区其武庳五里30号内歹专: -",
"Key": "何时由何地迁来本址"
}
}]
}
失败返回示例 {
"status": "-101",
"info": "未找到上传的文件"
}
错误码定义
