券下发(直发)
<p><strong>请求URI:</strong></p>
<ul>
<li><code>/admin/coupon/grant/direct</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST <code>AUTH</code></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>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">coupons</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">array</td>
<td>下发券列表</td>
</tr>
</tbody>
</table>
<p><strong>coupons参数:</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>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">goods_id</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">int</td>
<td>商品id</td>
</tr>
<tr>
<td style="text-align: left;">goods_info</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">string</td>
<td>商品信息</td>
</tr>
<tr>
<td style="text-align: left;">user_uuid</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">string</td>
<td>所属人uuid</td>
</tr>
<tr>
<td style="text-align: left;">grant_user_uuid</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">string</td>
<td>下发人uuid</td>
</tr>
<tr>
<td style="text-align: left;">par_price</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">int</td>
<td>面值(分)</td>
</tr>
<tr>
<td style="text-align: left;">expiry_datetime</td>
<td style="text-align: left;">require</td>
<td style="text-align: left;">int</td>
<td>到期时间戳,0=永久</td>
</tr>
</tbody>
</table>
<pre><code>//example goods_id为211的商品下发2张券
{
&quot;coupons&quot;: [
{
&quot;goods_id&quot;: 211,
&quot;goods_info&quot;: &quot;{\&quot;id\&quot;:211,\&quot;cover_image\&quot;:\&quot;/uploads/20240922/8ff4c9bb91e4737c453361d409860503.png\&quot;,\&quot;alias\&quot;:\&quot;MPV精洗5次卡\&quot;,\&quot;title\&quot;:\&quot;洗车来苏米哈 省钱省时省力\&quot;,\&quot;original_price\&quot;:128000,\&quot;sale_price\&quot;:49800,\&quot;content\&quot;:\&quot;&lt;img style=\\\&quot;max-width:100%;height:auto;\\\&quot; src=\\\&quot;https://broker.haswallow.com/uploads/20240922/30604ef19721b67f4e32fffa6c89ba62.png\\\&quot;&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;\&quot;,\&quot;gen_qrcode_qty\&quot;:5,\&quot;type\&quot;:0,\&quot;enable_switch\&quot;:1,\&quot;create_datetime\&quot;:\&quot;2024-09-04 16:14:05\&quot;,\&quot;update_datetime\&quot;:\&quot;2024-09-22 19:41:29\&quot;,\&quot;brokerage_price\&quot;:0,\&quot;category_id\&quot;:27,\&quot;hot_switch\&quot;:0,\&quot;scanner_brokerage_price\&quot;:0,\&quot;service_type\&quot;:0,\&quot;coupon_par_price\&quot;:9960,\&quot;coupon_expiry_day\&quot;:0,\&quot;affiliation_type\&quot;:0,\&quot;subjoin_coupon_par_price\&quot;:0,\&quot;subjoin_goods_ids\&quot;:{},\&quot;subjoin_gen_qrcode_qty\&quot;:1,\&quot;business_id\&quot;:0}&quot;,
&quot;coupon_uuid&quot;: &quot;cf4860d553774796b30fb32fb4c3181f&quot;,
&quot;user_uuid&quot;: &quot;cf740fb672bd4f56960819f2aa55d323&quot;,
&quot;expiry_datetime&quot;: 1727058778,
&quot;par_price&quot;: 9960,
&quot;grant_user_uuid&quot;: &quot;&quot;
},
{
&quot;goods_id&quot;: 211,
&quot;goods_info&quot;: &quot;{\&quot;id\&quot;:211,\&quot;cover_image\&quot;:\&quot;/uploads/20240922/8ff4c9bb91e4737c453361d409860503.png\&quot;,\&quot;alias\&quot;:\&quot;MPV精洗5次卡\&quot;,\&quot;title\&quot;:\&quot;洗车来苏米哈 省钱省时省力\&quot;,\&quot;original_price\&quot;:128000,\&quot;sale_price\&quot;:49800,\&quot;content\&quot;:\&quot;&lt;img style=\\\&quot;max-width:100%;height:auto;\\\&quot; src=\\\&quot;https://broker.haswallow.com/uploads/20240922/30604ef19721b67f4e32fffa6c89ba62.png\\\&quot;&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;\&quot;,\&quot;gen_qrcode_qty\&quot;:5,\&quot;type\&quot;:0,\&quot;enable_switch\&quot;:1,\&quot;create_datetime\&quot;:\&quot;2024-09-04 16:14:05\&quot;,\&quot;update_datetime\&quot;:\&quot;2024-09-22 19:41:29\&quot;,\&quot;brokerage_price\&quot;:0,\&quot;category_id\&quot;:27,\&quot;hot_switch\&quot;:0,\&quot;scanner_brokerage_price\&quot;:0,\&quot;service_type\&quot;:0,\&quot;coupon_par_price\&quot;:9960,\&quot;coupon_expiry_day\&quot;:0,\&quot;affiliation_type\&quot;:0,\&quot;subjoin_coupon_par_price\&quot;:0,\&quot;subjoin_goods_ids\&quot;:{},\&quot;subjoin_gen_qrcode_qty\&quot;:1,\&quot;business_id\&quot;:0}&quot;,
&quot;coupon_uuid&quot;: &quot;cf4860d553774796b30fb32fb4c3181f&quot;,
&quot;user_uuid&quot;: &quot;cf740fb672bd4f56960819f2aa55d323&quot;,
&quot;expiry_datetime&quot;: 1727058778,
&quot;par_price&quot;: 9960,
&quot;grant_user_uuid&quot;: &quot;&quot;
}
]
}</code></pre>
<p><strong>返回示例:</strong></p>
<pre><code>{
&quot;msg&quot;: &quot;请求成功&quot;,
&quot;data&quot;: [
{
&quot;goods_id&quot;: 211,
&quot;goods_info&quot;: &quot;{\&quot;id\&quot;:211,\&quot;cover_image\&quot;:\&quot;/uploads/20240922/8ff4c9bb91e4737c453361d409860503.png\&quot;,\&quot;alias\&quot;:\&quot;MPV精洗5次卡\&quot;,\&quot;title\&quot;:\&quot;洗车来苏米哈 省钱省时省力\&quot;,\&quot;original_price\&quot;:128000,\&quot;sale_price\&quot;:49800,\&quot;content\&quot;:\&quot;&lt;img style=\\\&quot;max-width:100%;height:auto;\\\&quot; src=\\\&quot;https://broker.haswallow.com/uploads/20240922/30604ef19721b67f4e32fffa6c89ba62.png\\\&quot;&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;\&quot;,\&quot;gen_qrcode_qty\&quot;:5,\&quot;type\&quot;:0,\&quot;enable_switch\&quot;:1,\&quot;create_datetime\&quot;:\&quot;2024-09-04 16:14:05\&quot;,\&quot;update_datetime\&quot;:\&quot;2024-09-22 19:41:29\&quot;,\&quot;brokerage_price\&quot;:0,\&quot;category_id\&quot;:27,\&quot;hot_switch\&quot;:0,\&quot;scanner_brokerage_price\&quot;:0,\&quot;service_type\&quot;:0,\&quot;coupon_par_price\&quot;:9960,\&quot;coupon_expiry_day\&quot;:0,\&quot;affiliation_type\&quot;:0,\&quot;subjoin_coupon_par_price\&quot;:0,\&quot;subjoin_goods_ids\&quot;:{},\&quot;subjoin_gen_qrcode_qty\&quot;:1,\&quot;business_id\&quot;:0}&quot;,
&quot;coupon_uuid&quot;: &quot;f629b36f8e0249ee87b8882dcf86f1cf&quot;,
&quot;user_uuid&quot;: &quot;cf740fb672bd4f56960819f2aa55d323&quot;,
&quot;expiry_datetime&quot;: 1727058778,
&quot;par_price&quot;: 9960,
&quot;grant_user_uuid&quot;: &quot;&quot;,
&quot;alliance_buy&quot;: 0,
&quot;used_switch&quot;: 0,
&quot;subjoin_switch&quot;: 0,
&quot;bind_switch&quot;: 1,
&quot;alliance_user_uuid&quot;: &quot;&quot;,
&quot;order_no&quot;: &quot;240923542190001&quot;,
&quot;bind_uuid&quot;: &quot;56520509cd4c4753a4b367513c49c7c5&quot;,
&quot;bind_datetime&quot;: &quot;2024-09-23 15:03:39&quot;
}
],
&quot;code&quot;: 0
}</code></pre>