海王星辰iPAAS对外通用接口

第三方对接 开放接口


5.6 获取渠道门店商品库存

<p>[TOC]</p> <h3>5.6 获取渠道门店商品库存</h3> <p>&gt;接口方向:第三方平台 ----&gt; 海王星辰 &lt;br&gt; <code>使用该接口无法获取虚拟仓、组合商品、疗程商品库存,建议主要通过 “4.5 同步经营门店库存”</code> <code>主要使用该接口来同步库存:</code><a href="https://www.showdoc.com.cn/nephealth/10201057146161073">“4.5 同步经营门店库存”</a> <a href="https://www.showdoc.com.cn/nephealth/10201057146161073">https://www.showdoc.com.cn/nephealth/10201057146161073</a></p> <p>&lt;br&gt;&lt;br&gt; &gt; - Url路径:{appKey}/getStock</p> <h4>5.6.1 接口请求模型</h4> <table> <thead> <tr> <th>参数代码    </th> <th>参数类型参数类型</th> <th>参数长度</th> <th>代码标识说明</th> <th>是否非空</th> <th>说明                    </th> </tr> </thead> <tbody> <tr> <td>pharmacyCode</td> <td>string          </td> <td>4        </td> <td>             </td> <td>Y        </td> <td>门店编码 获取仓库库存时 编码为01</td> </tr> <tr> <td>barcodes    </td> <td>List&lt;string&gt;    </td> <td>         </td> <td>             </td> <td>         </td> <td>商品编码集合(最大100个)</td> </tr> </tbody> </table> <p>&gt; 门店编码通过接口[5.4 获取门店列表(仅限O2O)]( <a href="https://www.showdoc.com.cn/nephealth/10201051945622334">https://www.showdoc.com.cn/nephealth/10201051945622334</a>) 来获取门店编码; 获取B2C 仓库库存时 编码为01</p> <p>&lt;br&gt;</p> <h4>5.6.2 接口返回模型</h4> <table> <thead> <tr> <th>参数代码</th> <th>参数类型参数类型    </th> <th>参数长度</th> <th>代码标识说明</th> <th>是否非空</th> <th>说明    </th> </tr> </thead> <tbody> <tr> <td>products</td> <td>List&lt;getStockModel&gt;</td> <td>         </td> <td>             </td> <td>Y        </td> <td>商品集合</td> </tr> </tbody> </table> <p>getStockModel                       </p> <table> <thead> <tr> <th>参数代码</th> <th>参数类型参数类型</th> <th>参数长度</th> <th>代码标识说明</th> <th>是否非空</th> <th>说明    </th> </tr> </thead> <tbody> <tr> <td>barcode  </td> <td>string          </td> <td>7        </td> <td>             </td> <td>Y        </td> <td>商品编码</td> </tr> <tr> <td>siteNo  </td> <td>string          </td> <td>100      </td> <td>             </td> <td>Y        </td> <td>地点编号</td> </tr> <tr> <td>quantity</td> <td>number          </td> <td>16,2    </td> <td>             </td> <td>Y        </td> <td>可用库存</td> </tr> </tbody> </table> <h4>5.6.3 Demo:</h4> <p>Request:</p> <pre><code>{     &amp;quot;appKey&amp;quot;:&amp;quot;NepHealth&amp;quot;,     &amp;quot;nonce&amp;quot;:&amp;quot;Tdsad2saa2a&amp;quot;,     &amp;quot;timestamp&amp;quot;:1639119614,     &amp;quot;sign&amp;quot;:&amp;quot;a1f8f760de8edfe74b3b7bb9d9c51e4379abfbdb1&amp;quot;,     &amp;quot;input&amp;quot;:{         &amp;quot;pharmacyCode&amp;quot;:&amp;quot;SC12&amp;quot;,         &amp;quot;barcodes&amp;quot;:[&amp;quot;0000001&amp;quot;,&amp;quot;0000002&amp;quot;]     } }</code></pre> <p>Response:</p> <pre><code>{     &amp;quot;code&amp;quot;: 200,     &amp;quot;msg&amp;quot;: &amp;quot;ok&amp;quot;,     &amp;quot;nonce&amp;quot;: &amp;quot;Tdsad2saa2a&amp;quot;,     &amp;quot;output&amp;quot;: {         &amp;quot;products&amp;quot;: [             {                 &amp;quot;quantity&amp;quot;: 2,                 &amp;quot;barcode&amp;quot;: &amp;quot;0000001&amp;quot;,                 &amp;quot;siteNo&amp;quot;: &amp;quot;SC12&amp;quot;             },             {                 &amp;quot;barcode&amp;quot;: &amp;quot;0000002&amp;quot;,                 &amp;quot;siteNo&amp;quot;: &amp;quot;SC12&amp;quot;,                 &amp;quot;quantity&amp;quot;: 0             }         ]     } }</code></pre>

页面列表

ITEM_HTML