地址:https://open.cnipr.com/cnipr-api/rs/api/trademark/tmd1/{client_id}}?openid={openid}&access_token={access_token}
HTTP POST
client_id,openid,access_token,dbs,exp,size,progress 参数含义见外观附录-检索分析参数
public void tmd1Test() throws Exception {
String url = String.format("http://open.cnipr.com/cnipr-api/rs/api/trademark/tmd1/%s?openid=%s&access_token=%s", client_id, openid, access_token);
String json = "{\"dbs\": \"CN\",\r\n \"exp\": \"int_cls=01\", \"size\": 10, \"progress\":\"CN1000057701\"}";
String result = this.POST(url, json);
System.out.println(result);
}
public String POST(String url, String json) throws Exception {
HttpClient httpClient = HttpClients.createDefault();
HttpPost httppost = new HttpPost(url);
httppost.setHeader("ContentType", "application/json");
StringEntity entity = new StringEntity(json, "UTF-8");
entity.setContentType("application/json");
httppost.setEntity(entity);
HttpResponse response = httpClient.execute(httppost);
HttpEntity result = response.getEntity();
String ss = EntityUtils.toString(result, "UTF-8");
EntityUtils.consume(entity);
return ss;
}
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| status | 状态码,0代表成功,其它值含义见附录 | long |
| message | 响应的信息描述 | String |
| total | 命中总数 | long |
| size | 下载数据条数 | long |
| progress | 当前下载进度,即本次下载结果返回的progress | String |
| records | 检索结果 | List<商标详细信息> -- 数据详细 |