小程序商品更新库存(批量)
<p><strong>接口状态:</strong>
已完成</p>
<p><strong>简要描述:</strong> </p>
<ul>
<li>每间隔<code>***</code>分钟, 将商品ID的总库存和自提网点的库存同步更新到小程序</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li>` <a href="https://dcx.lingzhishouji.com/gateway/api/erp/update_goods_stock">https://dcx.lingzhishouji.com/gateway/api/erp/update_goods_stock</a></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>产品类型</td>
<td>normal:商品;group:拼团;integral:积分</td>
</tr>
<tr>
<td style="text-align: left;">key</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>产品标识</td>
<td>type为 normal 和 integral时 内容为商品 <code>{商品ID}^^^{规格key}</code>;<br/>type为group时 内容为商品ID</td>
</tr>
<tr>
<td style="text-align: left;">stock</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>库存数量</td>
<td>-</td>
</tr>
<tr>
<td style="text-align: left;">store_code</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>门店编码</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>参数示例:</strong> </p>
<pre><code class="language-json">[
{
&quot;type&quot;:&quot;normal&quot;,
&quot;key&quot;:&quot;1^^^8Gú128G&quot;,
&quot;stock&quot;:20,
&quot;store_code&quot;:&quot;aaa&quot;
},
{
&quot;type&quot;:&quot;integral&quot;,
&quot;key&quot;:&quot;2^^^白色&quot;,
&quot;stock&quot;:30,
&quot;store_code&quot;:&quot;aaa&quot;
},
{
&quot;type&quot;:&quot;group&quot;,
&quot;key&quot;:&quot;2&quot;,
&quot;stock&quot;:40,
&quot;store_code&quot;:&quot;aaa&quot;
}
]</code></pre>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;code&quot;: 0,
&quot;data&quot;: [],
&quot;msg&quot;: &quot;&quot;
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>0成功,其他失败</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td>返回提示词</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">json</td>
<td>忽略</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>