Create a coupon
Dxplaination of Interface Call Request
When creating the coupon, status = 1, note that all the time fields below are timestamps in seconds!
Example of request parameters
Examples of back-up
Dxplaination of request parameters
| 参数 | type | Is it compulsory? | Introductions |
| type | number | yes | Types of coupons |
| name | string | yes | Coupon Name |
| discount_info.discount_condition.product_cnt | number | no | The amount of discounted merchandise vouchers |
| discount_info.discount_condition.product_ids | number | no | Product id, product discount coupon need to fill in |
| discount_info.discount_condition.product_price | number | no | Product prices, full coupons need to be filled in |
| discount_info.discount_fee | number | no | The amount reduced is in units. Direct reductions and full reductions are required |
| discount_info.discount_num | number | no | Number of items discounted, full discount vouchers need to be filled in, conversion rules, 5000 = 5 discount, 7000 = 7 discount, range is 1000 - 10000, must be an integer of 100 |
| ext_info.invalid_time | number | yes | Coupon expiration timestamp |
| ext_info.jump_product_id | number | no | The product id of the jump after receiving the discount coupon |
| ext_info.notes | string | no | Note information |
| ext_info.valid_time | number | yes | Coupon Expiration Date |
| promote_info.customize_channel | string | yes | User-Defined Promotion Channel |
| promote_info.promote_type | number | yes | Types of promotion |
| receive_info.end_time | number | yes | Coupon Acceptance End Time Stamp |
| receive_info.limit_num_one_person | number | yes | Limit on number of tickets per person |
| receive_info.start_time | number | yes | Coupon Acceptance Begins Date |
| receive_info.total_num | number | yes | Total number of coupons received |
| valid_info.end_time | number | no | The coupon has an expiration date, if start is required |
| valid_info.start_time | number | no | Choose between valid_day_num and valid_day_num |
| valid_info.valid_day_num | number | yes | Choose between the number of days the coupon is valid and start_time |
| valid_info.valid_type | number | yes | Type of coupon validity |
Dxplaination of callback parameters
| 参数 | type | Introductions |
| errcode | number | Error code |
| errmsg | string | Error message |
| data.coupon_id | number | Coupon ID |
Enumeration - coupon_type
| 枚举值 | describe |
| 1 | Discount coupon, discount_condition.product_ids, discount_condition.product_cnt, discount_info.discount_num Required |
| 2 | Discount coupon, discount_condition.product_ids, discount_condition.product_price, discount_info.discount_fee required |
| 3 | Product Uniform Discount Coupon, discount_condition.product_ids, discount_info.discount_num Required |
| 4 | Direct discount coupon, if less than the minimum price of the available item will be reminded (no item more than 50w reminder), discount_condition.product_ids, discount_fee required |
| 101 | Store Condition Discount Coupon, discount_condition.product_cnt, discount_info.discount_num required |
| 102 | Shop full discount coupon, discount_condition.product_price, discount_info.discount_fee required |
| 103 | Store Unified Discount Coupon, discount_info.discount_num required |
| 104 | Store direct discount coupon, if less than the minimum price of available items will be reminded (no item more than 50w reminder), discount_fee required |
Enumeration - valid_type
| 枚举值 | describe |
| 1 | The specified time frame takes effect |
| 2 | Number of days in effect |
Return code
| 返回码 | Error Type |
| -1 | System exceptions |
| -2 | Token too long |
| 9401020 | The parameter is incorrect. |