1.1 Description
path | http://www.your_website_domain.com/FeiEditor/api_v1/shop/coupons/update |
method | POST |
illustrate | create a new user |
1.2 parameters
name | must | type | describe |
id | Yes | int | ID of the coupon that needs to be updated |
code | no | string | Coupon code, cannot have duplicates |
type | no | string | Coupon 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 |
amount | no | int | Coupon amount or percentage, number |
individual_use | no | Boolean value | Whether this coupon can only be used alone, the default is |
product_ids | no | string | For the products that can be used with this coupon, separate them with commas, for example: 123,456. |
exclude_product_ids | no | string | Commodities that cannot be used with this coupon, if multiple are required, separate them with English commas, for example: 123,456. |
usage_limit | no | int | How many times this coupon can be used at most , there is no limit by default |
usage_limit_per_user | no | int | The maximum number that can be used by each customer, there is no limit by default |
expiry_date | no | date | Expiration date, for example: 2100-01-01, the default is not expired |
enable_free_shipping | no | Boolean value | Is it free shipping |
product_category_ids | no | string | Product categories that can be used with this coupon, if multiple are required separated by commas, for example: 123,456. |
exclude_product_category_ids | no | string | The category of products that cannot use this coupon, if multiple are required, separate them with English commas, for example: 123,456. |
minimum_amount | no | int | How much is in the shopping cart to use this coupon |
customer_emails | no | string | The 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 |
description | no | string | Description 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": "" } } } |