商品更新库存/名称/价格
<h1>线下商品同步线上</h1>
<h2>请求URL</h2>
<p>POST localhost/addons/yun_shop/api.php?route=plugin.wisely-system.open.goods.push&i=1</p>
<h2>请求参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>是否必需</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>body.mobile</td>
<td>string</td>
<td>是</td>
<td>当前时间戳(秒级10位) *参加签名</td>
</tr>
<tr>
<td>body.timestamp</td>
<td>string</td>
<td>是</td>
<td>当前时间戳(秒级10位) *参加签名</td>
</tr>
<tr>
<td>body.notstr</td>
<td>string</td>
<td>是</td>
<td>a-z A-Z 1-9, 随机12位字符串 *参加签名</td>
</tr>
<tr>
<td>goods</td>
<td>object</td>
<td>是</td>
<td>商品</td>
</tr>
<tr>
<td>goods.title</td>
<td>string</td>
<td>否</td>
<td>商品名称 (柬文)</td>
</tr>
<tr>
<td>goods.alias</td>
<td>string</td>
<td>否</td>
<td>商品简称 (中文)</td>
</tr>
<tr>
<td>goods.price</td>
<td>string</td>
<td>否</td>
<td>现价</td>
</tr>
<tr>
<td>goods.market_price</td>
<td>string</td>
<td>否</td>
<td>原价</td>
</tr>
<tr>
<td>goods.cost_price</td>
<td>string</td>
<td>否</td>
<td>成本价</td>
</tr>
<tr>
<td>goods.goods_sn</td>
<td>string</td>
<td>是</td>
<td>商品编码 注:ERP对应货号</td>
</tr>
<tr>
<td>goods.product_sn</td>
<td>string</td>
<td>是</td>
<td>商品条码 注:ERP对应条码</td>
</tr>
<tr>
<td>goods.stock</td>
<td>string</td>
<td>否</td>
<td>库存</td>
</tr>
</tbody>
</table>
<h3>请求示例</h3>
<pre><code>localhost/addons/yun_shop/api.php?route=plugin.wisely-system.open.goods.push&amp;i=1
{
&quot;body&quot;: {
&quot;notstr&quot;: &quot;JSND12323&quot;,
&quot;timestamp&quot;: &quot;1715047167&quot;
},
&quot;goods&quot;: {
&quot;goods_sn&quot;: &quot;0205010016&quot;,
&quot;product_sn&quot;: &quot;6972512180096&quot;,
&quot;stock&quot;: 200,
&quot;price&quot;: &quot;20.00&quot;,
&quot;market_price&quot;: &quot;50.00&quot;,
&quot;cost_price&quot;: &quot;10.00&quot;,
&quot;title&quot;: &quot;商品柬文&quot;,
&quot;alias&quot;: &quot;商品中文&quot;
},
&quot;sign&quot;: &quot;9ffa182f171901664b69aaf62d19ff7b&quot;
}</code></pre>
<h2>响应参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>int</td>
<td>结果. 0 = 失败, 1成功</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>信息。</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>-</td>
</tr>
</tbody>
</table>
<h3>响应成功</h3>
<pre><code class="language-json">{
&quot;result&quot;: 1,
&quot;msg&quot;: &quot;操作成功&quot;,
&quot;data&quot;: []
}</code></pre>
<h3>响应失败</h3>
<pre><code class="language-json">{
&quot;result&quot;: 0,
&quot;msg&quot;: &quot;参数错误, 请重试&quot;,
&quot;data&quot;: []
}</code></pre>