企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
**简要描述:** - 编辑优惠券 **请求URL:** - `/adminapi/marketing.coupon/edit` **请求方式:** - POST **参数:** |参数名 |必选 |类型 |说明 | | ------ | ------ | ------ |------ | |id |必选 |int |优惠券ID | |name |必选 |string |优惠券名称 | |money |必选 |float |优惠券面额 | |condition_type |必选 |int |使用条件 1=无门槛,2=订单满多少钱 | |condition_money |否 |float |使用条件金额,当condition_type=2时必填 | |send_total_type |必选 |int |发放数量类型 1=不限数量,2=固定数量 | |send_total |否 |int |发放数量,send_total_type=2时必填 | |use_time_type |必选 |string |用券时间类型:1=固定时间;2=领券当天起;3=领券次日起 | |use_time_start |否 |datetime |用券开始时间:use_time_type=1时生效 | |use_time_end |否 |datetime |用券结束时间:use_time_type=1时生效 | |use_time |否 |int |多少天内可用:use_time_type=2/3时生效 | |get_type |必选 |int |领取类型:1=用户领取, 2=商家赠送 | |get_num_type |必选 |int |领取次数类型:1=不限制领取次数;2=限制次数;3=每天限制数量 | |get_num |否 |int |领取次数类型: get_type=2/3时生效 | |use_goods_type |必选 |int |适用商品类型:1=全部商品;2=指定商品;3=指定商品不可用 | |use_goods_ids |必选 |array |使用商品ID, use_goods_type=2 / 3 时必填, 且数组不可为空 | **温馨提示:** ``` 1、如果优惠券正在进行中, status=1时, 只能编辑 优惠券名称 和 发放数量, 并且发放数量只能增加不能减少 2、如果优惠券不是进行中,那么优惠券是可以任意编辑的 status=2 3、已结束的优惠券不能编辑 status=3 ``` **请求示例:** ``` { "id": 1, "name": "满100减10元", "money": 10, "condition_type": 2, "condition_money": 100, "send_total_type": 2, "send_total": 10, "use_time_type": 1, "use_time_start": "2021-07-21 00:00:00", "use_time_end": "2021-07-22 00:00:00", "use_time": 0, "get_type": 1, "get_num_type": 1, "get_num": 0, "use_goods_type": 2, "use_goods_ids": [1] } ``` **返回示例:** ``` // 成功返回 { "code": 1, "show": 0, "msg": "编辑成功", "data": [] } // 不成功返回 { "code": 0, "show": 1, "msg": "优惠券已结束,禁止编辑", "data": [] } ```