# Update Coupon Information

The coupon can be renewed if and only if the status is 1.

# Instructions for Interface Calls

http请求方式:POST
https://api.weixin.qq.com/shop/coupon/update?access_token=xxxxxxxxx

# Example of request parameters

{
  "coupon": {
    "out_coupon_id": "coupon_id_1",
    "type": 101,
    "promote_type": 4,
    "coupon_info": {
      "name": "示例优惠券",
      "promote_info": {
        "promote_type": 4,
        "finder": {
          "nickname": "视频号昵称"
        }
      },
      "discount_info": {
        "discount_condition": {
          "product_cnt": 2,
          "product_price": 5000,
          "out_product_ids": ["product_id_3", "product_id_4"],
          "tradein_info": {
            "out_product_id": "product_id_5",
            "price": 10000
          },
          "buyget_info": {
            "buy_out_product_id": "product_id_1",
            "buy_product_cnt": 3,
            "get_out_product_id": "product_id_2",
            "get_product_cnt": 2131241242
          }
        },
        "discount_num": 9800,
        "discount_fee": 6400
      },
      "receive_info": {
        "start_time": 1625451250,
        "end_time": 1625454250,
        "limit_num_one_person": 10,
        "total_num": 100
      },
      "valid_info": {
        "valid_type": 1,
        "valid_day_num": 10,
        "valid_second": 3600,
        "start_time": 1625451250,
        "end_time": 1625464250
      }
    }
  }
}

# Examples of back-up

{
    "errcode": 0
}

# Dxplaination of request parameters

参数 type Is it compulsory? Introductions
coupon.out_coupon_id string yes Merchant Side Coupon ID
coupon.type number yes Types of coupons
coupon.promote_type number yes Types of Coupon Promotion
coupon.coupon_info.name string yes The name of the coupon
coupon.coupon_info.promote_info.promote_type number yes Types of Coupon Promotion
coupon.coupon_info.promote_info.finder.nickname string yes Promote your WeChat Channels nickname.
coupon.coupon_info.discount_info.discount_condition.product_cnt number no Number of items required under the discount conditions
coupon.coupon_info.discount_info.discount_condition.product_price number no The amount required to be met under the discount conditions
coupon.coupon_info.discount_info.discount_condition.out_product_ids string array no Designated Product Merchant Side ID
coupon.coupon_info.discount_info.discount_condition.tradein_info.out_product_id string no Exchange Goods Merchant Side ID
coupon.coupon_info.discount_info.discount_condition.tradein_info.price number no The amount to be paid in units
coupon.coupon_info.discount_info.discount_condition.buyget_info.buy_out_product_id string no Buy Merchandise Merchant Side ID
coupon.coupon_info.discount_info.discount_condition.buyget_info.buy_product_cnt number no Number of items purchased
coupon.coupon_info.discount_info.discount_condition.buyget_info.get_out_product_id string no Gift merchandise merchant side ID
coupon.coupon_info.discount_info.discount_condition.buyget_info.get_product_cnt number no Number of items given away
coupon.coupon_info.discount_info.discount_num number no The number of discounts, such as a 5.1 discount, must be filled in 5,100, and the discount coupon must be (no less than 2 discount).
coupon.coupon_info.discount_info.discount_fee number no The amount of the reduction is in units, the direct reduction coupon, the full reduction coupon must be necessary (not more than 200 yuan), and if it is a product coupon, the applicable goods offer must not be less than 2 percent of the original price, and if it's a store full reduction, the price threshold must not be lower than 2 percent.)
coupon.coupon_info.receive_info.start_time number yes Get Start Time (second time stamp)
coupon.coupon_info.receive_info.end_time number yes Receipt Closing Time (second time stamp)
coupon.coupon_info.receive_info.limit_num_one_person number yes Limit on number of tickets
coupon.coupon_info.receive_info.total_num number yes Total issuance
coupon.coupon_info.valid_info.valid_type number yes Type of period of validity, 1: item specified time range, 2: number of days in effect, 3: number of seconds in effect
coupon.coupon_info.valid_info.valid_day_num number no Number of days in effect, required when the type of period of validity is 2
coupon.coupon_info.valid_info.valid_second number no Number of validity seconds, required if the type of validity is 3
coupon.coupon_info.valid_info.start_time number no Commencement date (second timestamp), required when the validity type is 1
coupon.coupon_info.valid_info.end_time number no Effective end time (second timestamp), required when the validity type is 1
coupon.status number no Coupon Status