5.3后付费权益卡开通接口
<p>5.3后付费权益卡开通接口</p>
<h2>接口说明</h2>
<p>客户可通过该API接口为指定未付款用户先开通权益卡,让用户提前使用权益卡内的权益</p>
<p>路径:/interests-open-api/postPay/createOrder</p>
<p>方法: POST</p>
<p>> Body 请求参数</p>
<pre><code>{
&quot;thirdOrderNo&quot;: &quot;202108310000080000001215&quot;,
&quot;goodsItem&quot;: [
{
&quot;salesDetailId&quot;: &quot;1428284459796115458&quot;,
&quot;buyNum&quot;: 1,
&quot;onTime&quot;: &quot;2021-09-03 19:14:21&quot;
}
]
}</code></pre>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>位置</th>
<th>类型</th>
<th>必选</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>body</td>
<td>body</td>
<td>object</td>
<td>否</td>
<td></td>
<td>none</td>
</tr>
<tr>
<td>» thirdOrderNo</td>
<td>body</td>
<td>string</td>
<td>是</td>
<td>客户权益卡订单号</td>
<td>校验客户订单号是否重复,重复返回对应错误code和描述</td>
</tr>
<tr>
<td>» goodsItem</td>
<td>body</td>
<td>[object]</td>
<td>是</td>
<td>购买商品组</td>
<td>商品组以Array形式传入</td>
</tr>
<tr>
<td>»» salesDetailId</td>
<td>body</td>
<td>string</td>
<td>是</td>
<td>权益卡商品编号</td>
<td>校验权益卡商品编号是否正确,错误返回对应错误code和描述</td>
</tr>
<tr>
<td>»» buyNum</td>
<td>body</td>
<td>integer</td>
<td>是</td>
<td>购买商品数量</td>
<td>目前只支持入参:1</td>
</tr>
<tr>
<td>»» onTime</td>
<td>body</td>
<td>string</td>
<td>是</td>
<td>权益卡开通时间</td>
<td>目前只支持默认值,格式:yyyy-MM-dd HH:mm:ss</td>
</tr>
</tbody>
</table>
<p>header:</p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>长度限制</th>
<th>是否必填</th>
<th>介绍</th>
</tr>
</thead>
<tbody>
<tr>
<td>Authorization</td>
<td>String</td>
<td></td>
<td>是</td>
<td>Bearer 客户访问令牌/会员访问令牌</td>
</tr>
</tbody>
</table>
<p>> 返回示例
>
> 成功</p>
<pre><code>{
&quot;code&quot;: &quot;0&quot;,
&quot;data&quot;: {
&quot;orderNo&quot;: &quot;202204020000000000008461&quot;,
&quot;thirdOrderNo&quot;: &quot;20220328000222666&quot;,
&quot;goodsItem&quot;: [
{
&quot;salesDetailId&quot;: &quot;1428284459796115458&quot;,
&quot;userCardInfo&quot;: [
{
&quot;userCardId&quot;: &quot;1411937484253303032&quot;,
&quot;startTime&quot;: &quot;2021-09-14 00:00:00&quot;,
&quot;endTime&quot;: &quot;2021-09-14 23:59:59&quot;
}
]
}
]
},
&quot;message&quot;: &quot;请求成功&quot;,
&quot;service&quot;: &quot;&quot;,
&quot;success&quot;: true
}</code></pre>
<h3>返回结果</h3>
<table>
<thead>
<tr>
<th>状态码</th>
<th>状态码含义</th>
<th>说明</th>
<th>数据模型</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
<td>成功</td>
<td>Inline</td>
</tr>
</tbody>
</table>
<h3>返回数据结构</h3>
<p>状态码 <strong>200</strong></p>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>» code</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td></td>
<td>none</td>
</tr>
<tr>
<td>» data</td>
<td>object</td>
<td>true</td>
<td>none</td>
<td></td>
<td>none</td>
</tr>
<tr>
<td>»» orderNo</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>平台权益卡订单号</td>
<td>none</td>
</tr>
<tr>
<td>»» thirdOrderNo</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>客户权益卡订单号</td>
<td>none</td>
</tr>
<tr>
<td>»» goodsItem</td>
<td>[object]</td>
<td>true</td>
<td>none</td>
<td>用户开通权益卡数据</td>
<td>none</td>
</tr>
<tr>
<td>»»» salesDetailId</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>权益卡商品编号</td>
<td>none</td>
</tr>
<tr>
<td>»»» userCardInfo</td>
<td>[object]</td>
<td>true</td>
<td>none</td>
<td>用户权益卡信息</td>
<td>none</td>
</tr>
<tr>
<td>»»»» userCardId</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>用户权益卡编号</td>
<td>none</td>
</tr>
<tr>
<td>»»»» startTime</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>用户权益卡生效时间</td>
<td>none</td>
</tr>
<tr>
<td>»»»» endTime</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td>用户权益卡失效时间</td>
<td>none</td>
</tr>
<tr>
<td>» message</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td></td>
<td>none</td>
</tr>
<tr>
<td>» service</td>
<td>string</td>
<td>true</td>
<td>none</td>
<td></td>
<td>none</td>
</tr>
<tr>
<td>» success</td>
<td>boolean</td>
<td>true</td>
<td>none</td>
<td></td>
<td>none</td>
</tr>
</tbody>
</table>
<h2>支付枚举值</h2>
<table>
<thead>
<tr>
<th>枚举值</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>ALI</td>
<td>支付宝</td>
</tr>
<tr>
<td>WX</td>
<td>微信</td>
</tr>
<tr>
<td>BF</td>
<td>宝付</td>
</tr>
<tr>
<td>YB</td>
<td>易宝</td>
</tr>
<tr>
<td>HSQ</td>
<td>慧收钱</td>
</tr>
<tr>
<td>OTHER</td>
<td>其他</td>
</tr>
</tbody>
</table>
<h2>错误</h2>
<table>
<thead>
<tr>
<th>codes</th>
<th>问题描述</th>
<th>解决</th>
</tr>
</thead>
<tbody>
<tr>
<td>401</td>
<td>Bearer令牌不允许为空/token无效</td>
<td>请检查Authorization参数</td>
</tr>
<tr>
<td>INTERESTS_10055</td>
<td>三方订单号不可重复下单</td>
</tr>
<tr>
<td>400</td>
<td>缺少参数</td>
<td>具体内容查阅返回的message字段</td>
</tr>
</tbody>
</table>