1.1 Description

 
pathhttp://www.your_website_domain.com/FeiEditor/api_v1/shop/coupons/update
methodPOST
illustratecreate a new user
  

1.2 parameters

 
namemusttypedescribe
idYesintID of the coupon that needs to be updated
codenostringCoupon code, cannot have duplicates
typenostringCoupon type, can be any one of fixed_cart, percent, fixed_product and percent_product. The default is fixed_cart.fixed_cart - generic fixed amountpercent  - the generic percentagefixed_product - a fixed amount for a productpercent_product - the percentage of a product
amountnointCoupon amount or percentage, number
individual_usenoBoolean valueWhether this coupon can only be used alone, the default is
product_idsnostringFor the products that can be used with this coupon, separate them with commas, for example: 123,456.
exclude_product_idsnostringCommodities that cannot be used with this coupon, if multiple are required, separate them with English commas, for example: 123,456.
usage_limitnointHow many times this coupon can be used at most , there is no limit by default
usage_limit_per_usernointThe maximum number that can be used by each customer, there is no limit by default
expiry_datenodateExpiration date, for example: 2100-01-01, the default is not expired
enable_free_shippingnoBoolean valueIs it free shipping
product_category_idsnostringProduct categories that can be used with this coupon, if multiple are required separated by commas, for example: 123,456.
exclude_product_category_idsnostringThe category of products that cannot use this coupon, if multiple are required, separate them with English commas, for example: 123,456.
minimum_amountnointHow much is in the shopping cart to use this coupon
customer_emailsnostringThe email addresses of customers who can use this coupon. If there are multiple customers, please separate them with commas. For example: user01@api.com, user02@api.com
descriptionnostringDescription of the coupon
  

1.3 return result

 
correct result
Return format: JSON
{
  "customer":
    {
      "id": 1,
      "created_at": "2017-10-10T18:00:00Z",
      "email": "demo@api.com",
      "first_name": "Demo",
      "last_name ": "User",
      "username": "demouser01",
      "last_order_id": 123,
      "last_order_date": "2017-10-10T18:00:00Z",
      "orders_count": 10,
      "total_spent": "1034.58",
      "avatar_url": "",
      "billing_address": {
        "first_name": "",
        "last_name": "",
        "company": "",
        "address_1": "",
        "address_2": "",
        "city": "",
        "state": "",
        "postcode": "",
        "country": "",
        "email": "",
        "phone": ""
      },
      "shipping_address": {
        "first_name": "",
        "last_name": "",
        "company " : "",
        "address_1": "",
        "address_2": "",
        "city": "",
        "state": "",
        "postcode": "",
        "country": ""
      } }
    }