药品和药企信息
<h3>简介</h3>
<ul>
<li>提供近十万种药品信息详情,对药品及药企信息进行查询,包括药品和药企互搜、名称搜索药品、以及对药品详情进行查询。</li>
<li>提供了3个接口,分别为:药企搜索、药品搜索、药品详情</li>
</ul>
<h3>接口调用说明</h3>
<h4>请求方式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>POST</strong></p>
<h4>请求格式</h4>
<p>如接口没有单独说明,所有接口均为:<strong>application/form-data</strong></p>
<h4>请求参数</h4>
<p>请求参数均包括公共参数和业务参数(业务参数见具体接口说明)
如接口没有单独说明,所有接口调用时,均需要把<strong>公共参数</strong>和<strong>业务参数</strong>一并放在<strong>请求参数</strong>中提交</p>
<p><a name="公共请求参数"></a></p>
<h5>公共请求参数</h5>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间戳(毫秒)</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见签名算法说明</td>
</tr>
</tbody>
</table>
<h5>签名算法说明</h5>
<pre><code>sign = sha256(appId + appSecret + timestamp)</code></pre>
<p>用服务商分配的 <strong>appId</strong>、服务商分配的 <strong>appSecret</strong>,当前时间戳(毫秒) <strong>timestamp</strong>,按上述顺序拼接成字符串,再进行 <strong>sha256</strong> 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h4>返回说明</h4>
<h5>返回字段说明</h5>
<p>所有接口均返回以下公共字段:</p>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:420px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见:code返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志 true为计费,false为不计费</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,object类型,详见data返回字段描述</td>
</tr>
</tbody>
</table>
<p><a name="code返回码说明"></a></p>
<h5>code返回码说明</h5>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:420px;">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>201</td>
<td>未找到相关数据!</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>请求地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>服务商维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>
<hr />
<h3>药企搜索</h3>
<ul>
<li>对输入的药企进行搜索。</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/drug/factory/query</code></p>
<h3>业务参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>factoryName</td>
<td>String</td>
<td>是</td>
<td>药企名称</td>
</tr>
<tr>
<td>address</td>
<td>String</td>
<td>否</td>
<td>地址</td>
</tr>
<tr>
<td>pageNo</td>
<td>Integer</td>
<td>否</td>
<td>页数,默认1</td>
</tr>
<tr>
<td>pageSize</td>
<td>Integer</td>
<td>否</td>
<td>每页记录数,默认100</td>
</tr>
</tbody>
</table>
<p>公共请求参数请参阅:<a href="#公共请求参数">公共请求参数</a></p>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;743791816156725010176792&quot;,//本次请求号
&quot;charge&quot;: true,//计费标志
&quot;data&quot;: {
&quot;pageNo&quot;: 1,//第几页
&quot;pageSize&quot;: 100,//每页多少条
&quot;totalRecord&quot;: 1,//总记录数
&quot;resultList&quot;: [
{
&quot;factoryName&quot;: &quot;西安碑林药业股份有限公司&quot;,//企业名称
&quot;address&quot;: &quot;xxx&quot;,//公司地址
&quot;linkPhone&quot;: &quot;&quot;,//联系电话
&quot;cerNum&quot;: &quot;陕20160054&quot;,
&quot;categoryCode&quot;: &quot;Ahz&quot;,
&quot;lr&quot;: &quot;夏志东&quot;,//法人
&quot;cd&quot;: &quot;夏志东&quot;,
&quot;scope&quot;: &quot;xxx&quot;,//经验范围
&quot;province&quot;: &quot;陕西省&quot;,//省
&quot;regAddr&quot;: &quot;xxx&quot;,//注册地址
&quot;issueDate&quot;: &quot;2020-12-17&quot;,//注册日期
&quot;validUntil&quot;: &quot;2025-12-16&quot;,
&quot;orgCode&quot;: &quot;91610103729963688A&quot;,//统一社会信用代码
&quot;qp&quot;: &quot;石丽&quot;,
&quot;issueAgency&quot;: &quot;陕西省药品监督管理局&quot;,//登记机关
&quot;issuePeople&quot;: &quot;应宏锋&quot;,//登记人
&quot;regulator&quot;: &quot;陕西省药品监督管理局&quot;,//监管者
&quot;link&quot;: &quot;&quot;
}
]
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 400,//返回码,详见返回码说明
&quot;msg&quot;: &quot;药企名称不能为空&quot;,//返回码对应描述
&quot;charge&quot;: false //计费标志
}</code></pre>
<hr />
<h3>药品搜索</h3>
<ul>
<li>通过药品名称 药企名称 或者药品的准字号来查询药品信息</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/drug/query</code></p>
<h3>业务参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>key</td>
<td>String</td>
<td>是</td>
<td>关键字</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>是</td>
<td>关键字的类型:1药品名称 2药企名称 3药准字号</td>
</tr>
<tr>
<td>pageNo</td>
<td>Integer</td>
<td>否</td>
<td>页数,每页20条数据,默认为1</td>
</tr>
</tbody>
</table>
<p>公共请求参数请参阅:<a href="#公共请求参数">公共请求参数</a></p>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;737619926157342200644693&quot;,//本次请求号
&quot;charge&quot;: true,//计费标志
&quot;data&quot;: {
&quot;pageNo&quot;: &quot;1&quot;,//页数
&quot;pageSize&quot;: &quot;20&quot;,//每页多少条
&quot;totalRecord&quot;: 587,//总记录数
&quot;drugList&quot;: [
{
&quot;id&quot;: &quot;5e6ad8d89484a8b112ee39aa&quot;,//id
&quot;blfy&quot;: &quot;尚不明确。&quot;,//不良反应
&quot;drugName&quot;: &quot;阿莫西林克拉维酸钾(7:1)片&quot;,//药品名称
&quot;ggxh&quot;: &quot;0.375g(C16H19N3O5S 0.25g与C8H9NO5 0.125g)&quot;,//规格型号
&quot;jj&quot;: &quot;尚不明确。&quot;,//禁忌
&quot;manu&quot;: &quot;湘北威尔曼制药股份有限公司&quot;,//生产企业
&quot;price&quot;: &quot;13.20&quot;,//参考价格
&quot;pzwh&quot;: &quot;国药准字H20051710&quot;,//批准文号
&quot;type&quot;: &quot;&quot;,//药品类别
&quot;xz&quot;: &quot;本品白色椭圆形薄膜衣片,除去包衣后显白色或类黄色;味微苦,有引湿性。&quot;,//性状
&quot;yfyl&quot;: &quot;口服。 1.成人和12岁以上小儿,一次1片,一日3次,严重感染时剂量可加倍。 2.未经重新检查,连续治疗期不超过14日。&quot;,//用法用量
&quot;ywxhzy&quot;: &quot;如与其他药物同时使用可能会发生药物相互作用,详情请咨询医师或药师。&quot;,//药物相互作用
&quot;yxq&quot;: &quot;暂定24个月&quot;,//有效期
&quot;zc&quot;: &quot;&quot;,//贮藏
&quot;img&quot;: &quot;&quot;,//图片地址,有效期30天。建议自行下载保存,避免丢失
&quot;zxbz&quot;: &quot;&quot;,//执行标准
&quot;zysx&quot;: &quot;&quot;,//注意事项
&quot;zycf&quot;: &quot;&quot;,//主要成份
&quot;zzjb&quot;: &quot;&quot;//主治疾病
}
]
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 201,//返回码,详见返回码说明
&quot;msg&quot;: &quot;未找到相关数据!&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;949047831136199410934044&quot;,//本次请求号
&quot;charge&quot;: false//计费标志
}</code></pre>
<hr />
<h3>药品详情</h3>
<ul>
<li>对药品详细信息进行查询</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/drug/detail</code></p>
<h3>业务参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>drugId</td>
<td>String</td>
<td>否</td>
<td>药品ID,药品搜索接口返回的ID</td>
</tr>
<tr>
<td>pzwh</td>
<td>String</td>
<td>否</td>
<td>批准文号,譬如:国药准字H20045760,药品ID和批准文号至少要输入一个</td>
</tr>
</tbody>
</table>
<p>公共请求参数请参阅:<a href="#公共请求参数">公共请求参数</a></p>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;017844227229319772912580&quot;,//本次请求号
&quot;charge&quot;: true //计费标志
&quot;data&quot;: {
&quot;id&quot;: &quot;5d6e69fa9484a4e7842d9cd6&quot;,//id
&quot;blfy&quot;: &quot;xxxx&quot;,//不良反应
&quot;drugName&quot;: &quot;阿莫西林胶囊&quot;,//药品名称
&quot;ggxh&quot;: &quot;0.25g*50粒&quot;,//规格型号
&quot;img&quot;: &quot;xxx&quot;,//图片地址,有效期30天。建议自行下载保存,避免丢失
&quot;jj&quot;: &quot;青霉素过敏及青霉素皮肤试验阳性患者禁用。&quot;,//禁忌
&quot;manu&quot;: &quot;圣大(张家口)药业有限公司&quot;,//生产企业
&quot;price&quot;: &quot;14.50&quot;,//参考价格
&quot;pzwh&quot;: &quot;国药准字H13020473&quot;,//批准文号
&quot;syz&quot;: &quot;xxxx&quot;,//适应症
&quot;type&quot;: &quot;&quot;,//药品类别
&quot;xz&quot;: &quot;本品内容物为白色至黄色粉末或颗粒。&quot;,//性状
&quot;yfyl&quot;: &quot;xxx&quot;,//用法用量
&quot;ywxhzy&quot;: &quot;xxxx&quot;,//药物相互作用
&quot;yxq&quot;: &quot;24个月&quot;,//有效期
&quot;zc&quot;: &quot;遮光,密封保存。&quot;,//贮藏
&quot;zxbz&quot;: &quot;中国药典2010年版二部&quot;,//执行标准
&quot;zysx&quot;: &quot;xxxx&quot;,//注意事项
&quot;zzjb&quot;: &quot;xxxx&quot;,//主治疾病
&quot;zycf&quot;: &quot;阿莫西林。&quot; //主要成份
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 201,//返回码,详见返回码说明
&quot;msg&quot;: &quot;未找到相关数据!&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;949047831136199410934044&quot;,//本次请求号
&quot;charge&quot;: false//计费标志
}</code></pre>