资料库 API列表
联系我们
注册 登录

pv1,植物新品种表达式检索接口

  • 请求地址:

    地址:https://open.cnipr.com/cnipr-api/v1/api/cocave/pv1/{client_id}

  • 请求方法:

    HTTP POST

  • 请求参数:

    取 消 提交申请 清空

    参数名称 参数说明 是否必填 参数类型
    client_id 应用id,如没有clientId请先接入应用,查看接入流程获取 true String
    openid 用户id,可通过 Implicit Grant 方式 Authorization Code 方式 等两种方式获取openid true String
    access_token 访问令牌,可通过 Implicit Grant 方式 Authorization Code 方式Refresh Token 方式 等三种方式获取access_token获取token true String
    exp 检索表达式,例:来源=农业农村部
    PlantDto说明字段
    true String
    from 检索起始位,从0开始,不能为负数。from:0表示从第1条开始取数据 true integer
    to 检索数量,最小值为1,上限为50。size:5表示获取5条数据 true integer
    queryType 检索类型,默认值:2 (按字检索)其它值含义见附录 false int
  • Postman 调用展示
    plant.png
  • 部分请求参数如下:
    exp:来源=农业农村部
    queryType:2
    from:0
    size:10
                                                
  • Java + HTTP POST
            String client_id = "your_client_id";//替换为真实client_id
            String access_token = "your_access_token";//替换为真实access_token
            String openid = "your_open_id";//替换为真实open_id
    
            String url = "http://open.cnipr.com/cnipr-api/v1/api/cocave/pv1/"+client_id;
            List nvps = new ArrayList();
            // 提交参数及值
            nvps.add(new BasicNameValuePair("openid", openid));
            nvps.add(new BasicNameValuePair("access_token", access_token));
            nvps.add(new BasicNameValuePair("exp", "来源=农业农村部"));
            nvps.add(new BasicNameValuePair("from", "0"));
            nvps.add(new BasicNameValuePair("size", "10"));
            nvps.add(new BasicNameValuePair("queryType", "2"));
    
            DefaultHttpClient httpclient = new DefaultHttpClient();
            HttpPost httppost = new HttpPost(url);
            httppost.setHeader("ContentType", "application/x-www-form-urlencoded");
            // 设置表单提交编码为UTF-8
            UrlEncodedFormEntity entry = new UrlEncodedFormEntity(nvps, "UTF-8");
            entry.setContentType("application/x-www-form-urlencoded;charset=UTF-8");
            httppost.setEntity(entry);
            HttpResponse response = httpclient.execute(httppost);
            HttpEntity entity = response.getEntity();
            String ss = EntityUtils.toString(entity, "UTF-8");
            //打印返回结果
            System.out.println(ss);
            EntityUtils.consume(entity);
            httpclient.getConnectionManager().shutdown();
    
  • 响应参数:
    属性名称 属性说明 属性类型
    status 状态码,0代表成功,其它值含义见附录 long
    message 响应的信息描述 String
    total 命中总数 long
    from 检索起始位 int
    size 检索数量 int
    results 检索结果集 List<PlantDto> -- 数据详细
  • results数据详细说明:

    PlantDto

    属性名称 说明 类型
    id 编号 String
    opttime 更新日期 String
    ds 来源 String
    pans 申请号 String
    pkd 种类 String
    pnm 名称 String
    pubInfos 公告信息 List<PubInfoDto>

    PubInfoDto

    属性名称 说明 类型
    bid 序号 String
    aty 公告类型 String
    clat 品种权事务分类 String
    pand 申请日 String
    sqr 申请人或品种权人 String
    gkr 共同品种权人原始 String
    gkrArr 共同品种权人 String[]
    pyr 培育人原始 String
    pyrArr 培育人 String[]
    ppn 公告号 String
    ppd 公告日 String
    prn 优先权号 String
    prd 优先权日 String
    pkad 地址 String
    pks 品种来源 String
    dofs 申请日前销售情况 String
    agen 代理机构 String
    agdr 代理机构地址 String
    agr 代理人 String
    expl 说明 String
    grd 授权日 String
    grn 授权号 String
    vcnu 品种权证书号 String
    tdy 颁证日 String
    state 目前状态 String
    dda 视为放弃日 String
    dwd 视为撤回日 String
    rrd 权利恢复日 String
    afd 申请撤回日 String
    tdvr 品种权终止日 String
    rda 申请的驳回日 String
    tncd 品种暂定名称变更日 String
    ncb 变更前名称 String
    nca 变更后名称 String
    tdad 品种申请权的转让日 String
    prb 转让前 String
    pra 转让后 String
    adc 地址变更日 String
    adb 变更前地址 String
    ada 变更后地址 String
    sqd 申请人或品种权人变更日 String
    sqa 变更前申请人或品种权人 String
    sqb 变更后申请人或品种权人 String
    pcd 培育人变更日 String
    pcf 变更前培育人 String
    pca 变更后培育人 String
    agcd 代理人变更日 String
    agcf 变更前代理人 String
    agca 变更后代理人 String
    agencd 代理机构变更日 String
    agencf 变更前代理机构 String
    agenca 变更后代理机构 String
    reas 原因 String
    pkadProvince String
    pkadCity String
    pkadCounty String
    agdrProvince 代理机构省 String
    agdrCity 代理机构市 String
    agdrCounty 代理机构区 String