库存同步接口
<h5>接口使用描述</h5>
<pre><code>同步商品的库存</code></pre>
<h5>接口地址</h5>
<pre><code> 接口地址:http://clubmall.liantuofu.com/api/hiboos/synchronization/goodsStock</code></pre>
<p><br/></p>
<h4>请求参数<img src='<a href="https://www.showdoc.cc/server/api/common/visitfile/sign/bfc24f8d7eb93fae8e66d4ab2b4bc461?showdoc=.jpg">https://www.showdoc.cc/server/api/common/visitfile/sign/bfc24f8d7eb93fae8e66d4ab2b4bc461?showdoc=.jpg</a>' align='right' style=' width:300px;height:100 px'/></h4>
<table>
<thead>
<tr>
<th><strong>NO</strong></th>
<th><strong>字段</strong></th>
<th><strong>名称</strong></th>
<th><strong>长度</strong></th>
<th><strong>必填</strong></th>
<th><strong>示例</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>appId</td>
<td>合作方标识</td>
<td>string</td>
<td>Y</td>
<td>EW_N2949193174</td>
<td>合作商户编码,用于以后所有接口发起请求时验签使用</td>
</tr>
<tr>
<td>2</td>
<td>sign</td>
<td>签名。具体参见“<a href="https://www.showdoc.cc/web/#/liantuofu?page_id=673453270295568">签名规则</a>”</td>
<td>string</td>
<td>Y</td>
<td>1b70687c8a4c72f50c749baf95a482c0</td>
<td>MD5加密验签值。具体参见“<a href="https://www.showdoc.cc/web/#/liantuofu?page_id=673453270295568">签名规则</a>”</td>
</tr>
<tr>
<td>3</td>
<td>random</td>
<td>随机数</td>
<td>string</td>
<td>Y</td>
<td>123</td>
<td>用来增加加密验签的复杂度,长度不限制,只限制传递数字,不支持中文,字母,特殊符号。</td>
</tr>
<tr>
<td>4</td>
<td>jsonRequest</td>
<td>同步数据(json格式,参照下文说明)</td>
<td>string</td>
<td>Y</td>
<td>{ "outStationNo": "EW_N2100428432", "stocks": [ { "outSkuId": "60227", "goodsId": "60227", "stock": 1 } ] }</td>
<td>同步的商品数据</td>
</tr>
<tr>
<td>5</td>
<td>type</td>
<td>类型</td>
<td>string</td>
<td>Y</td>
<td>hb </td>
<td>类型,目前都传hb</td>
</tr>
</tbody>
</table>
<hr />
<h4>响应参数</h4>
<table>
<thead>
<tr>
<th><strong>NO</strong></th>
<th><strong>字段</strong></th>
<th><strong>名称</strong></th>
<th><strong>长度</strong></th>
<th><strong>必填</strong></th>
<th><strong>示例</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>code</td>
<td>结果</td>
<td>string</td>
<td>Y</td>
<td>SUCCESS</td>
<td>同步结果 SUCCESS:同步成功 FAILED:同步失败</td>
</tr>
<tr>
<td>2</td>
<td>msg</td>
<td>结果描述</td>
<td>string</td>
<td>Y</td>
<td>同步成功/失败</td>
<td>无论是成功或者失败,message都会针对于当前的结果返回响应的结果描述</td>
</tr>
</tbody>
</table>
<p><br/><br/></p>
<h5>请求示例:</h5>
<pre><code></code></pre>
<h5>响应示例(成功):</h5>
<pre><code class="language-json">{
&quot;code&quot;: &quot;SUCCESS&quot;,
&quot;msg&quot;: &quot;同步成功&quot;
}</code></pre>
<h5>响应示例(失败):</h5>
<pre><code class="language-json">{
&quot;code&quot;:&quot;FAILED&quot;,
&quot;msg&quot;:&quot;同步失败&quot;,
}</code></pre>
<h5>jsonRequest入参详细说明</h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>outStationNo</td>
<td>String</td>
<td>Y</td>
<td>商家门店编号</td>
<td>EW_N<strong>**</strong></td>
</tr>
<tr>
<td>stocks</td>
<td>List<Stock></td>
<td>Y</td>
<td>商品的库存信息,最多50条</td>
<td></td>
</tr>
</tbody>
</table>
<h5>二级参数Stock类属性::</h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>outSkuId</td>
<td>String</td>
<td>Y</td>
<td>商家商品编号(见商品同步接口解释)</td>
<td>1002545</td>
</tr>
<tr>
<td>goodsId</td>
<td>String</td>
<td>N</td>
<td>ERP商品编码</td>
<td>10025</td>
</tr>
<tr>
<td>stock</td>
<td>Integer</td>
<td>Y</td>
<td>库存数量。如果是计重称重品,则传的是对应库存重量,单位:克。如果是计份称重品,则传的是对应份数</td>
<td>1500</td>
</tr>
</tbody>
</table>
<p>请求入参示例
{"outStationNo":"EW_N2100428432","stocks":[{"outSkuId":"6936158285218","goodsId":"6936158285218","stock":50}]}</p>