getCartPromotionCollection
Retrieve promotions associated with a cart.
Operation ID: getCartPromotionCollectionGET
https://{yourinstance}.salesforce.com/services/data/v64.0/commerce/webstores/{webstoreId}/carts/{activeCartOrId}/promotions
Used to get all promotions associated with the cart.
Request
curl "https://{yourinstance}.salesforce.com/services/data/v64.0/commerce/webstores/{webstoreId}/carts/{activeCartOrId}/promotions"
URI parameters
activeCartOrId
string
Required
The valid value is—cartId (ID of the cart), active (this value is only to be used for authenticated users), or current (cart that isn’t closed or pending deletion).
webstoreId
string
Required
The ID of the web store.
Query parameters
currencyIsoCode
string
The three-letter ISO 4217 currency code of the cart.
effectiveAccountId
string
The ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context.
Responses
Success
{
"cartId": "",
"cartStatus": "Active—Cart is created and available for modifications, like adding or removing products or promotions.",
"currencyIsoCode": "",
"promotions": {
"promotions": [
{
"adjustmentAmount": "",
"couponCode": "",
"currencyIsoCode": "",
"displayName": "",
"promotionId": "",
"targetType": "Cart—Promotion targets a cart.",
"termsAndConditions": ""
}
]
}
}
Body
Media type:
application/json
cartId
string
The ID of the cart.
cartStatus
string
enum
The status of a cart.
connect
wrapper:
Enum values:
- Active—Cart is created and available for modifications, like adding or removing products or promotions.
- Checkout—Cart is in checkout. If the customer modifies the cart, the current checkout session is canceled.
- Closed—Checkout is complete and an order was created. The cart cannot be modified.
- PendingClosed—Cart is marked to be closed, but the request isn't completed yet. The cart can’t be modified.
- PendingDelete—Cart is marked for delete, but the request isn't completed yet. The cart can’t be modified.
- Processing—Cart is processing. For example, taxes are being calculated. The cart can’t be modified.
currencyIsoCode
string
The three-letter ISO 4217 currency code associated with the cart.
promotions
object
Collection of promotions for a cart.
connect
wrapper: