海王星辰iPAAS对外通用接口

第三方对接 开放接口


4.5 同步经营门店库存

<p>[TOC]</p> <h3>4.5 同步经营门店库存</h3> <p>&gt; - Url路径:[建议]setStock</p> <h4>4.5.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>门店号 V1.3加入</td> </tr> <tr> <td>stockList    </td> <td>List&lt;setStockModel&gt;</td> <td>         </td> <td>             </td> <td>         </td> <td>库存集合        </td> </tr> </tbody> </table> <p>setStockModel</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>quantity</td> <td>number          </td> <td>16,2    </td> <td>             </td> <td>Y        </td> <td>可用库存</td> </tr> </tbody> </table> <h4>4.5.2 接口返回模型</h4> <table> <thead> <tr> <th>参数名称</th> <th>参数类型</th> <th>参数长度</th> <th>代码标识说明</th> <th>必填</th> <th>说明                          </th> </tr> </thead> <tbody> <tr> <td>code    </td> <td>int      </td> <td>3        </td> <td>Y            </td> <td>Y    </td> <td>成功标识 200:成功 -1:失败/异常</td> </tr> <tr> <td>msg      </td> <td>string  </td> <td>200      </td> <td>             </td> <td>Y    </td> <td>返回信息                      </td> </tr> <tr> <td>output  </td> <td>object  </td> <td>         </td> <td>             </td> <td>     </td> <td>返回数据                      </td> </tr> <tr> <td>nonce    </td> <td>string  </td> <td>200      </td> <td>             </td> <td>Y    </td> <td>请求时的nonce原样返回          </td> </tr> </tbody> </table> <h4>4.5.3 Demo:</h4> <p>Request:</p> <pre><code>{     &amp;quot;appKey&amp;quot;: &amp;quot;NepHealth&amp;quot;,     &amp;quot;input&amp;quot;: {         &amp;quot;pharmacyCode&amp;quot;: &amp;quot;K502&amp;quot;,         &amp;quot;stockList&amp;quot;: [{             &amp;quot;barcode&amp;quot;: &amp;quot;0000001&amp;quot;,             &amp;quot;quantity&amp;quot;: 0.00         }, {             &amp;quot;barcode&amp;quot;: &amp;quot;0000035&amp;quot;,             &amp;quot;quantity&amp;quot;: 2.00         }, {             &amp;quot;barcode&amp;quot;: &amp;quot;0000065&amp;quot;,             &amp;quot;quantity&amp;quot;: 3.00         }]     },     &amp;quot;nonce&amp;quot;: &amp;quot;c212b542-f177-4a82-b42c-1d402bc2f404&amp;quot;,     &amp;quot;sign&amp;quot;: &amp;quot;b4c75914177f6cc2406e8fcd6274e6e6e71794dd&amp;quot;,     &amp;quot;timestamp&amp;quot;: 1646619589 }</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;c212b542-f177-4a82-b42c-1d402bc2f404&amp;quot;,     &amp;quot;output&amp;quot;: null } </code></pre>

页面列表

ITEM_HTML