API: Add Order Draft discount
addOrderDraftDiscount
Add coupon or a custom discount to draft order.
Required parameters
Parameter | Description |
id | Draft ID |
coupon | Use promotion code ID to apply coupons, client for personal or client group discount, or custom for custom discount |
Optional parameters
Parameter | Description |
validate | When set to 1 it will validate coupon code against client usage. Only available when using coupon ID |
target | Custom discount target, either all or items |
type | Type of the discount, percent or fixed . Only available for custom coupon with target set to all |
value | Discount value. Only available for custom coupon with target set to all |
items | Array with item specific discounts. Only available for custom coupon with target set to items |
cycle | Discount cycle, once or recurring. Only available for custom coupon |
Request
PHP Samples
PHP Samples: 10% discount to all items
PHP Samples: 5% discount only to first service in draft
Response