顾客创建订单
<p><strong>简要描述:</strong> </p>
<ul>
<li>在顾客购买商品或者退货产生订单时,调用该接口</li>
<li>1.方案A同步串行(小程序创建订单时就要和ERP联动,ERP锁定SN码并返回给小程序, 这样可以保证该订单的库存和SN码有效性):该接口返回成功后,才能说明该订单在小程序有效。</li>
<li>2.方案B异步并行(小程序创建订单后推送给ERP,订单付款时需检查商品是否有SN码,没有需再调【获取订单附加信息】接口获取SN码, 有几率存在订单创建没问题,付款的时候会库存不足):该接口无论是否返回成功,不影响该订单的后续操作。</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://moa.58lz.com:803/api/OGBAPP/sellord?mode=CRT&amp;client_secret=*******</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<p>输入参数结构 等同【订单查询】API输出的订单详情参数结构 </p>
<p><strong>请求示例</strong></p>
<pre><code>{
&quot;id&quot;: 7,
&quot;order_pay_id&quot;: 8,
&quot;order_number&quot;: &quot;2511051835178790&quot;,
&quot;merchant_id&quot;: 1,
&quot;member_id&quot;: 29,
&quot;integral&quot;: 0,
&quot;integral_price&quot;: 0,
&quot;platform_coupon_id&quot;: null,
&quot;platform_member_coupon_id&quot;: null,
&quot;platform_coupon_price&quot;: 0,
&quot;merchant_coupon_id&quot;: null,
&quot;merchant_member_coupon_id&quot;: null,
&quot;merchant_coupon_price&quot;: 0,
&quot;member_address_id&quot;: null,
&quot;member_address_data&quot;: null,
&quot;store_id&quot;: 1,
&quot;store_data&quot;: {
&quot;id&quot;: 1,
&quot;lat&quot;: 45.809398,
&quot;lng&quot;: 126.537116,
&quot;code&quot;: &quot;10010&quot;,
&quot;name&quot;: &quot;100H1236 万象汇店&quot;,
&quot;sort&quot;: 0,
&quot;enable&quot;: true,
&quot;address&quot;: &quot;哈尔滨市松北区世茂大道555号万象汇(哈尔滨店)&quot;,
&quot;area_id&quot;: 230109,
&quot;city_id&quot;: 230100,
&quot;contact&quot;: &quot;13633663366&quot;,
&quot;work_time&quot;: &quot;09:00-20:00&quot;,
&quot;created_at&quot;: &quot;2025-11-05 17:26:46&quot;,
&quot;updated_at&quot;: &quot;2025-11-05 17:26:46&quot;,
&quot;province_id&quot;: 230000
},
&quot;take_data&quot;: {
&quot;mark&quot;: &quot;测试&quot;,
&quot;phone&quot;: &quot;18746008422&quot;,
&quot;contact&quot;: &quot;李李李&quot;
},
&quot;write_off_code&quot;: &quot;2511051835179377&quot;,
&quot;remark&quot;: &quot;&quot;,
&quot;merchant_remark&quot;: &quot;&quot;,
&quot;status&quot;: &quot;done&quot;,
&quot;price_goods&quot;: 0.02,
&quot;price_delivery&quot;: 0,
&quot;price_discount_total&quot;: 0,
&quot;price_discount_platform&quot;: 0,
&quot;price_discount_merchant&quot;: 0,
&quot;price_total&quot;: 0.02,
&quot;total_weight&quot;: 1,
&quot;total_size&quot;: 1.5,
&quot;total_num&quot;: 1,
&quot;remain_price&quot;: 0.02,
&quot;remain_num&quot;: 1,
&quot;cancel_at&quot;: null,
&quot;write_off_member&quot;: &quot;张珊珊&quot;,
&quot;write_off_at&quot;: &quot;2025-11-05 18:35:52&quot;,
&quot;receive_at&quot;: null,
&quot;done_at&quot;: null,
&quot;close_at&quot;: null,
&quot;auto_close_at&quot;: &quot;2025-11-05 18:45:17&quot;,
&quot;after_sales_expire_at&quot;: null,
&quot;refund_price&quot;: 0,
&quot;refund_delivery&quot;: false,
&quot;delivery_company&quot;: null,
&quot;delivery_number&quot;: null,
&quot;delivery_remark&quot;: null,
&quot;created_at&quot;: &quot;2025-11-05 18:35:17&quot;,
&quot;updated_at&quot;: &quot;2025-11-05 18:36:15&quot;,
&quot;order_pay&quot;: {
&quot;id&quot;: 8,
&quot;order_number&quot;: &quot;2511051835179288&quot;,
&quot;price&quot;: &quot;0.02&quot;,
&quot;pay_method&quot;: &quot;member_balance&quot;,
&quot;transaction_id&quot;: &quot;2511051835191789&quot;,
&quot;pay_price&quot;: &quot;0.02&quot;,
&quot;was_pay&quot;: true,
&quot;pay_at&quot;: &quot;2025-11-05 18:35:19&quot;,
&quot;created_at&quot;: &quot;2025-11-05 18:35:17&quot;,
&quot;updated_at&quot;: &quot;2025-11-05 18:35:19&quot;
},
&quot;order_goods&quot;: [
{
&quot;id&quot;: 7,
&quot;order_id&quot;: 7,
&quot;member_id&quot;: 29,
&quot;merchant_id&quot;: 1,
&quot;goods_id&quot;: 1,
&quot;cart_id&quot;: null,
&quot;integral&quot;: 0,
&quot;integral_price&quot;: 0,
&quot;platform_coupon_id&quot;: null,
&quot;platform_member_coupon_id&quot;: null,
&quot;platform_coupon_price&quot;: 0,
&quot;merchant_coupon_id&quot;: null,
&quot;merchant_member_coupon_id&quot;: null,
&quot;merchant_coupon_price&quot;: 0,
&quot;goods_name&quot;: &quot;HUAWEI POCKET2 优享版&quot;,
&quot;attr_type&quot;: &quot;multi&quot;,
&quot;attr_data&quot;: {
&quot;key&quot;: &quot;8Gú128G&quot;,
&quot;code&quot;: &quot;&quot;,
&quot;cost&quot;: 1,
&quot;name&quot;: &quot;8G,128G&quot;,
&quot;size&quot;: 1.5,
&quot;price&quot;: 0.02,
&quot;stock&quot;: 100,
&quot;weight&quot;: 1,
&quot;name_arr&quot;: [
&quot;8G&quot;,
&quot;128G&quot;
],
&quot;shop_price&quot;: 1,
&quot;primary_image&quot;: &quot;/upload/ba/ba174871ed7b5a4bb3f4dda35cb65dc6_n.png&quot;
},
&quot;price&quot;: 0.02,
&quot;num&quot;: 1,
&quot;weight&quot;: &quot;1.00&quot;,
&quot;size&quot;: &quot;1.50&quot;,
&quot;price_discount&quot;: &quot;0.00&quot;,
&quot;price_discount_merchant&quot;: &quot;0.00&quot;,
&quot;price_discount_platform&quot;: &quot;0.00&quot;,
&quot;price_refund&quot;: &quot;0.00&quot;,
&quot;remain_price&quot;: &quot;0.02&quot;,
&quot;remain_num&quot;: 1,
&quot;custom_message&quot;: [],
&quot;was_evaluate&quot;: true,
&quot;was_refund&quot;: false,
&quot;request_refund&quot;: false,
&quot;created_at&quot;: &quot;2025-11-05 18:35:17&quot;,
&quot;updated_at&quot;: &quot;2025-11-05 18:36:15&quot;
}
],
&quot;member&quot;: {
&quot;id&quot;: 29,
&quot;id_applet_wechat&quot;: &quot;oo3XU5GWpNmbryWhL-wRDr0mNPgA&quot;,
&quot;nickname&quot;: &quot;超级无敌小花花&quot;,
&quot;avatar&quot;: &quot;/upload/9e/9e62ffae8fe1ce6ca03abcd6cee3806b_n.jpeg&quot;,
&quot;phone&quot;: &quot;18746008422&quot;,
&quot;type&quot;: &quot;worker&quot;,
&quot;country_code&quot;: &quot;86&quot;,
&quot;enable&quot;: true,
&quot;collect_num_goods&quot;: 0,
&quot;collect_num_store&quot;: 0,
&quot;history_num&quot;: 0,
&quot;integral&quot;: 0,
&quot;integral_locked&quot;: 0,
&quot;balance&quot;: 9600.95,
&quot;real_name&quot;: &quot;李李李&quot;,
&quot;id_card&quot;: &quot;230121199503255824&quot;,
&quot;remark&quot;: null,
&quot;vip_expired_at&quot;: &quot;2026-11-05 23:59:59&quot;,
&quot;created_at&quot;: &quot;2025-08-22 18:45:00&quot;,
&quot;updated_at&quot;: &quot;2025-11-11 11:37:46&quot;
},
&quot;settle_distribution&quot;: []
}</code></pre>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;revcode&quot;: 0,
&quot;revmsg&quot;: &quot;ok&quot;
&quot;revobj&quot;:{
&quot;ordno&quot;:&quot;2511051835179288&quot;,
&quot;7&quot;:{&quot;barcode&quot;:&quot;6945654322&quot;,&quot;sn&quot;:&quot;4555/55335&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;">revcode</td>
<td style="text-align: left;">int</td>
<td>0成功,非0失败错误编码</td>
</tr>
<tr>
<td style="text-align: left;">revmsg</td>
<td style="text-align: left;">string</td>
<td>返回提示词</td>
</tr>
<tr>
<td style="text-align: left;">revobj</td>
<td style="text-align: left;">json</td>
<td>显示具体返回内容</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&lfloor; ordno</td>
<td style="text-align: left;">string</td>
<td>调用该接口传入的订单号</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&lfloor; ordempphone</td>
<td style="text-align: left;">string</td>
<td>订单自提时返回(如果没有,则取自提网点信息),自提联系人员手机号</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&lfloor; ordempname</td>
<td style="text-align: left;">string</td>
<td>订单自提时返回(如果没有,则取自提网点信息),自提联系人员名称</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&lfloor; key</td>
<td style="text-align: left;">json</td>
<td>key是订单order_goods的ID</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&nbsp;&nbsp;&lfloor;&lfloor; barcode</td>
<td style="text-align: left;">string</td>
<td>商品69条码</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&nbsp;&nbsp;&lfloor;&lfloor; IMEI</td>
<td style="text-align: left;">string</td>
<td>手机串码</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&nbsp;&nbsp;&lfloor;&lfloor; SN</td>
<td style="text-align: left;">string</td>
<td>商品SN码</td>
</tr>
<tr>
<td style="text-align: left;">&nbsp;&nbsp;&nbsp;&lfloor;&lfloor; errmsg</td>
<td style="text-align: left;">string</td>
<td>revcode属于6100-6199时,会显示商品明细行的错误描述(例如 revcode=6101时,这个errmsg提示为库存不足)</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>