Newer Version Available

This content describes an older version of this product. View Latest

Commerce Webstore Cart Items Promotions

Get promotions associated with items in a cart.

If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.

Resource
1/commerce/webstores/webstoreId/carts/cartStateOrId/cart-items/promotions
Values for cartStateOrId are:
  • cartId—ID of the cart.
  • active—Active cart. This value should only be used for authenticated users.
  • current—Cart that isn’t closed or pending deletion. Available in version 50.0 and later.
Available version
53.0
HTTP methods
POST

POST methods typically create an item, but for this resource POST is used to retrieve information. Both POST and GET retrieve the same information. However, GET calls can be cached.

Request body for POST
Root XML tag
<cartItemPromotionCollectionInput>
JSON example
1{
2"items": [
3   {
4   "cartItemId":"0a9xx000000000GAAQ"
5   },
6   {
7   "cartItemId":"0a9xx000000000GBCQ"
8   }
9   ]
10}
Properties
Name Type Description Required or Optional Available Version
items Cart Item Promotion Input[] List of cart items to get the associated promotions. Required 53.0
Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
currencyIsoCode String Currency ISO code of the cart. Optional 57.0
effective​AccountId String ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. Optional 53.0
Response body for POST
Cart Item Promotion Collection