commerce/orders/ordercoupons
Use this subresource to apply coupons to or remove coupons from an order based on a supplied coupon code.
JSON Example
AppliedDiscount Properties
Property | Description |
---|---|
couponCode |
type: string The coupon code that a shopper uses to redeem an associated discount on a purchase. This is also the unique identifier of the coupon itself. |
discount |
type: discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. |
discount |
type: DateTime Date and time in UTC format when a discount, credit, wish list, or cart expires. An expired discount no longer can be redeemed. An expired wish list is no longer available. An expired credit can no longer be redeemed for a purchase. Acart becomes inactive and expired based on a system-calculated interval. For example, if an anonymous shopper has 14 days of inactivity, the cart is considered abandoned after that period of inactivity. System-supplied and read-only. |
discount |
type: bool Indicates whether the discount includes multiple products to be targeted. The target products are what the discount will be applied to, such as a bonus free item. |
discount |
type: int Unique identifier of the source property, such as a catalog, discount, order, or email template. For a product field it will be the name of the field. For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID. For a product attribute it will be the Attribute FQN. For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366 For email templates, the ID must be one of the following values:
|
discount |
type: list of string List of cart or order items to which the discount applies, if applicable. |
discount |
type: string The user supplied name that appears in Admin. You can use this field for identification purposes. |
excluded |
type: bool Indicates if a discount is not used for the product or product line item in an order. If true, the system ignores this discount when pricing the order. |
impact |
type: decimal The value of the discount applied to the cart or order, represented as a negative currency amount to apply to the original price. |
Operations
Operation Name | Request URI | Description |
---|---|---|
ApplyCoupon | PUT %7borderId%7d%2fcoupons%2f%7bcouponCode%7d%3fupdatemode%3d%7bupdateMode%7d%26version%3d%7bversion%7d%26responseFields%3d%7bresponseFields%7d |
Apply a coupon to the order. |
RemoveCoupon | DELETE %7borderId%7d%2fcoupons%2f%7bcouponcode%7d%3fupdatemode%3d%7bupdateMode%7d%26version%3d%7bversion%7d |
Removes a coupon previously applied to the order. |
RemoveCoupons | DELETE %7borderId%7d%2fcoupons%3fupdatemode%3d%7bupdateMode%7d%26version%3d%7bversion%7d |
Removes all coupons previously applied to the order. |