订单创建接口
<p>[TOC]</p>
<h2>接口说明</h2>
<p>> 餐饮订单生成</p>
<h2>功能描述</h2>
<ul>
<li>餐饮订单生成</li>
</ul>
<h2>调用方式</h2>
<ul>
<li>HTTPS</li>
</ul>
<pre><code>POST {{base_url}} /api/open_service/v1/open_order_create</code></pre>
<h2>注意事项</h2>
<ul>
<li>请求参数 header参数</li>
</ul>
<p><code>请求头参数, 详见请求约定中的鉴权说明.</code></p>
<ul>
<li>请求参数 body参数</li>
</ul>
<p><code>注意, 此请求参数为json格式. 放置在post请求体中, 以raw格式数据请求</code></p>
<h2>请求参数</h2>
<table>
<thead>
<tr>
<th>属性</th>
<th>类型</th>
<th>必填</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>contact_mobile</td>
<td>int</td>
<td>是</td>
<td>下单人手机号</td>
</tr>
<tr>
<td>product_id</td>
<td>int</td>
<td>是</td>
<td>商品ID</td>
</tr>
<tr>
<td>spec_id</td>
<td>int</td>
<td>是</td>
<td>商品规格信息ID</td>
</tr>
<tr>
<td>goods_num</td>
<td>int</td>
<td>是</td>
<td>商品下单的数量</td>
</tr>
<tr>
<td>partner_order_price</td>
<td>int</td>
<td>是</td>
<td>分销订单价格 单位(分)</td>
</tr>
<tr>
<td>partner_order_no</td>
<td>bigint</td>
<td>是</td>
<td>分销商订单号</td>
</tr>
<tr>
<td>remark</td>
<td>string</td>
<td>否</td>
<td>订单备注</td>
</tr>
</tbody>
</table>
<h2>返回参数</h2>
<table>
<thead>
<tr>
<th>属性</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>int</td>
<td>0-成功;</td>
</tr>
<tr>
<td>message</td>
<td>string</td>
<td>返回信息说明</td>
</tr>
<tr>
<td>data</td>
<td>array</td>
<td>返回订单信息</td>
</tr>
<tr>
<td>data.main_order_no</td>
<td>string</td>
<td>主订单号</td>
</tr>
<tr>
<td>data.partner_order_no</td>
<td>bigint</td>
<td>外部订单号</td>
</tr>
<tr>
<td>data.order_info</td>
<td>array</td>
<td>订单信息</td>
</tr>
<tr>
<td>data.order_info.order_no</td>
<td>string</td>
<td>订单号</td>
</tr>
<tr>
<td>data.order_info.order_status</td>
<td>int</td>
<td>订单状态</td>
</tr>
<tr>
<td>data.order_info.supplier_id</td>
<td>string</td>
<td>供应商ID</td>
</tr>
<tr>
<td>data.order_info.type</td>
<td>int</td>
<td>订单类型</td>
</tr>
<tr>
<td>data.order_info.arg_goods</td>
<td>array</td>
<td>订单的商品信息</td>
</tr>
<tr>
<td>data.order_info.arg_goods.validity_argument_start</td>
<td>string</td>
<td>有效开始日期</td>
</tr>
<tr>
<td>data.order_info.arg_goods.validity_argument_end</td>
<td>string</td>
<td>有效截至日期</td>
</tr>
<tr>
<td>data.order_info.arg_goods.get_week</td>
<td>array</td>
<td>适用周期: 0-周一;1-周二;2-周三;3-周四;4-周五;5-周六;6-周日;</td>
</tr>
<tr>
<td>data.order_info.arg_goods.disabled_date</td>
<td>string</td>
<td>不可用日期</td>
</tr>
<tr>
<td>data.order_info.arg_goods.refund_way</td>
<td>string</td>
<td>过期退款方式 0:永久不退 1: 过期自动退</td>
</tr>
<tr>
<td>data.order_info.arg_goods.after_sale_type</td>
<td>string</td>
<td>售后服务, 超时退款时间(单位小时)</td>
</tr>
<tr>
<td>data.order_info.arg_goods.after_sale_argument</td>
<td>string</td>
<td>商品类型:1-爱伊荟;</td>
</tr>
<tr>
<td>data.order_info.arg_goods.goods_name</td>
<td>int</td>
<td>订单的商品名称</td>
</tr>
<tr>
<td>data.order_info.arg_goods.goods_id</td>
<td>int</td>
<td>订单的商品ID</td>
</tr>
<tr>
<td>data.order_info.arg_goods.goods_sn</td>
<td>string</td>
<td>订单的商品编码</td>
</tr>
<tr>
<td>data.order_info.arg_goods.organization_id</td>
<td>int</td>
<td>订单的商品组织ID</td>
</tr>
<tr>
<td>data.order_info.arg_goods.spec_id</td>
<td>int</td>
<td>订单的商品规格ID</td>
</tr>
<tr>
<td>data.order_info.arg_goods.goods_num</td>
<td>int</td>
<td>订单的商品数量</td>
</tr>
<tr>
<td>data.order_info.arg_goods.goods_pic</td>
<td>string</td>
<td>订单的商品图片信息</td>
</tr>
<tr>
<td>data.order_info.arg_goods.arg_code_sn</td>
<td>array</td>
<td>订单的商品核销码信息</td>
</tr>
<tr>
<td>data.order_info.arg_goods.arg_code_sn.code_sn</td>
<td>string</td>
<td>订单的商品核销码</td>
</tr>
<tr>
<td>data.order_info.arg_goods.arg_code_sn.code_status</td>
<td>int</td>
<td>订单的商品核销码状态</td>
</tr>
</tbody>
</table>
<h2>调用示例</h2>
<ul>
<li>示例说明: HTTPS请求</li>
</ul>
<h2>请求数据示例</h2>
<pre><code>{
&quot;contact_mobile&quot;:19946455644,
&quot;product_id&quot;:525,
&quot;spec_id&quot;:280,
&quot;goods_num&quot;:2,
&quot;partner_order_price&quot;:2,
&quot;remark&quot;:&quot;测试备注&quot;,
&quot;partner_order_no&quot;:&quot;100000001000009&quot;
}</code></pre>
<h2>返回数据示例</h2>
<pre><code>{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;成功&quot;,
&quot;data&quot;: {
&quot;main_order_no&quot;: &quot;TESTDD2023102011563341303&quot;,
&quot;out_order_no&quot;: &quot;100000001000016&quot;,
&quot;order_info&quot;: [
{
&quot;order_no&quot;: &quot;TESTDD2023102011563384713&quot;,
&quot;order_status&quot;: 1,
&quot;supplier_id&quot;: 101,
&quot;type&quot;: 1,
&quot;arg_goods&quot;: [
{
&quot;goods_name&quot;: &quot;&quot;,
&quot;goods_id&quot;: 525,
&quot;goods_sn&quot;: &quot;TESTCP2023071410060391846&quot;,
&quot;organization_id&quot;: 101,
&quot;spec_id&quot;: 280,
&quot;goods_num&quot;: 2,
&quot;goods_pic&quot;: &quot;https://dongli-oss.malldongli.com/upload/default/20230714100515/138ab9d46ef4036955e116923706ed4f.jpg&quot;,
&quot;validity_argument_start&quot;: 1689264000,
&quot;validity_argument_end&quot;: 1689264000,
&quot;get_week&quot;: [
&quot;0&quot;,
&quot;1&quot;,
&quot;2&quot;,
&quot;3&quot;,
&quot;4&quot;,
&quot;5&quot;,
&quot;6&quot;
],
&quot;disabled_date&quot;: &quot;&quot;,
&quot;refund_way&quot;: 0,
&quot;after_sale_type&quot;: 0,
&quot;after_sale_argument&quot;: &quot;&quot;,
&quot;arg_code_sn&quot;: [
{
&quot;code_sn&quot;: &quot;328504940660&quot;,
&quot;code_status&quot;: 0
},
{
&quot;code_sn&quot;: &quot;875940834400&quot;,
&quot;code_status&quot;: 0
}
]
}
]
}
]
}
}</code></pre>
<h2>错误码</h2>
<table>
<thead>
<tr>
<th>错误码</th>
<th>解决方案</th>
</tr>
</thead>
<tbody>
<tr>
<td>2000</td>
<td>【订单号】等相关参数信息不合法</td>
</tr>
<tr>
<td>2001</td>
<td>第三方订单:【订单号】,关联的机构信息丢失,请联系管理员!</td>
</tr>
<tr>
<td>2002</td>
<td>第三方订单:【订单号】,订单关联的商品信息暂无推广信息</td>
</tr>
<tr>
<td>2003</td>
<td>第三方订单:【订单号】,订单关联的商品信息丢失,请联系管理员</td>
</tr>
<tr>
<td>2004</td>
<td>第三方订单:【订单号】,预处理订单信息缺失</td>
</tr>
<tr>
<td>2005</td>
<td>第三方订单:【订单号】,预处理订单扩展信息缺失</td>
</tr>
<tr>
<td>2006</td>
<td>第三方订单:【订单号】,预处理订单联系信息缺失</td>
</tr>
<tr>
<td>2007</td>
<td>第三方订单:【订单号】,预处理订单商品信息缺失</td>
</tr>
<tr>
<td>2008</td>
<td>第三方订单:【订单号】,预处理订单核销码信息缺失</td>
</tr>
<tr>
<td>2009</td>
<td>第三方订单:【订单号】,预处理订单支付信息缺失</td>
</tr>
<tr>
<td>2010</td>
<td>第三方订单:【订单号】,预处理主订单支付信息缺失</td>
</tr>
<tr>
<td>2011</td>
<td>第三方订单:【订单号】,更新导码核销码信息异常</td>
</tr>
<tr>
<td>2012</td>
<td>第三方订单:【订单号】,核销码的库存不足,请联系管理增加库存</td>
</tr>
<tr>
<td>2013</td>
<td>第三方订单:【订单号】,保存订单扩展信息异常,请稍后重试</td>
</tr>
<tr>
<td>2014</td>
<td>第三方订单:【订单号】,保存订单商品信息异常,请稍后重试</td>
</tr>
<tr>
<td>2015</td>
<td>第三方订单:【订单号】,保存订单地址信息异常,请稍后重试</td>
</tr>
<tr>
<td>2016</td>
<td>第三方订单:【订单号】,保存核销码信息异常,请稍后重试</td>
</tr>
<tr>
<td>2017</td>
<td>第三方订单:【订单号】,保存订单支付信息异常,请稍后重试</td>
</tr>
<tr>
<td>2018</td>
<td>第三方订单:【订单号】,操作频繁,请稍后重试.</td>
</tr>
<tr>
<td>2019</td>
<td>第三方订单:【订单号】,服务器异常,请稍后重试.</td>
</tr>
</tbody>
</table>