地址:https://open.cnipr.com/cnipr-api/rs/api/trademark/tmd0/{client_id}?openid={openid}&access_token={access_token}
HTTP GET
| 参数名称 | 参数说明 | 是否必填 | 参数类型 |
|---|---|---|---|
| client_id | 应用id,如没有clientId请先接入应用,查看接入流程获取 | true | String |
| openid | 用户id,可通过 Password Grant 方式 或 Implicit Grant 方式 或 Authorization Code 方式 获取 | true | String |
| access_token | 访问令牌,可通过
Password Grant 方式 或
Implicit Grant 方式 或
Authorization Code 方式或
Refresh Token 方式 |
true | String |
| tid | 商标唯一标识符 | true | String |
tid:CN1002041114
public class SearchClientTest {
String client_id = "CLIENT_ID";
String openid = "OPENID";
String access_token = "ACCESS_TOKEN";
/**
* 获取专利全文图片 PDF 接口,redirect方法
*/
@Test
public void expSerachTest() throws Exception {
String url = "/rs/api/trademark/tmd0/"+client_id;
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
// 提交参数及值
nvps.add(new BasicNameValuePair("openid", openid));
nvps.add(new BasicNameValuePair("access_token", access_token));
nvps.add(new BasicNameValuePair("tid", "CN1002041114"));//商标唯一标识符
this.get(url, nvps);
}
public void get(String url, List<NameValuePair> nvps) throws Exception {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);
String str = EntityUtils.toString(new UrlEncodedFormEntity(nvps,"UTF-8"));
httpGet.setURI(new URI(httpGet.getURI().toString() + "?" + str));
HttpResponse response = httpClient.execute(httpGet);
// TODO
httpClient.getConnectionManager().shutdown();
}
}
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| status | 状态码,0代表成功,其它值含义见附录 | long |
| message | 响应的信息描述 | String |
| data | 检索结果 | 商标详细信息 -- 数据详细 |