CouponCode
The coupon code
interface CouponCode {
code?: string;
discount_amount?: number;
discount_type?: number;
expires_date?: number;
id?: number;
name?: string;
total_discount?: number;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
code | Optional | string | The coupon code. Required in a /POST request. |
discount_amount | Optional | number | The amount of the discount based on the coupon. For example, 3 percent off will show a 3. |
discount_type | Optional | number | The discount type. - type 0: per_item_discount - type 1: percentage_discount - type 2: per_total_discount - type 3: shipping_discount - type 4: free_shipping |
expires_date | Optional | number | Returns 0 if a expiration date is not set |
id | Optional | number | Coupon Id |
name | Optional | string | Name given to the coupon in the Control Panel |
total_discount | Optional | number | Total discount amount off cart |