Commerce Webstore Promotions, Associate Action
Gets the associated promotions and price adjustments for a cart and its
items. Only the 50 highest priority eligible promotions are processed.
- Resource
-
1/commerce/webstores/webstoreId/promotions/actions/associate - Available version
- 53.0–55.0
- HTTP methods
- POST
- Request body for POST
-
- Root XML tag
- <salesTransaction>
- JSON example
-
1{ 2 "effectiveAccountId":"001RM000004ywq7YAA", 3 "couponCodes": ["CODEA", "CODEB"], 4 "salesTransaction":{ 5 "attributes":{ 6 "type":"WebCart" 7 }, 8 "Id":"0a6RM00000009XAYAY", 9 "CurrencyIsoCode":"USD", 10 "TotalAmount":1479.00, 11 "CartItems":{ 12 "records":[ 13 { 14 "attributes":{ 15 "type":"CartItem" 16 }, 17 "Id":"0a9RM0000004OseYAE", 18 "Product2Id":"01tRM000000QVWKYA4", 19 "Quantity":15, 20 "TotalPriceAfterAllAdjustments":660.00 21 }, 22 { 23 "attributes":{ 24 "type":"CartItem" 25 }, 26 "Id":"0a9RM0000004OsfYAE", 27 "Product2Id":"01tRM000000QVW7YAO", 28 "Quantity":5, 29 "TotalPriceAfterAllAdjustments":202.50 30 }, 31 { 32 "attributes":{ 33 "type":"CartItem" 34 }, 35 "Id":"0a9RM0000004OsgYAE", 36 "Product2Id":"01tRM000000QVWFYA4", 37 "Quantity":6, 38 "TotalPriceAfterAllAdjustments":594.00 39 } 40 ] 41 } 42 } 43} - Properties
-
Name Type Description Required or Optional Available Version couponCodes List<String> List of coupon codes applied to the transaction. You can apply a maximum of two coupons. Optional 54.0 effectiveAccountId String ID of the account for which the request is made. Required 53.0 salesTransaction Map<String, Object> Map of a cart and its items. The fields shown in the example are required to process promotions. Additional fields are allowed but ignored. Required 53.0
- Response body for POST
- Promotion Association Collection