Update Cart Settings
PUT/v2/settings/cart
You can modify the cart expiry settings to set it to any number of days up to 365. Any existing carts default to the expiry of 7 days. To update cart settings in Commerce Manager, see Updating Cart setting.
With update cart settings endpoint, you can:
- Enable or disable custom discounts by setting the custom_discounts_enabled field to true. This allows you to activate your custom discounts from external services.
- Enable or disable the use of rule promotions within the cart. You can apply this setting either at the store level using the update cart setting endpoint or individually to a specific cart using the update a cart endpoint.
Request
- application/json
Body
data object
Describes the type of request payload you’re sending. Set this value to settings
.
Indicates the number of days before a cart expires.
discounts object
When true
, custom discounts are enabled. Default is false. This setting only affects the new empty carts while the existing active carts will not be affected.
Responses
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema
data object
Describes the type of request payload you’re sending. Set this value to settings
.
Indicates the number of days before a cart expires.
discounts object
When true
, custom discounts are enabled. Default is false. This setting only affects the new empty carts while the existing active carts will not be affected.
{
"data": {
"type": "settings",
"cart_expiry_days": 25,
"discounts": {
"custom_discounts_enabled": false
}
}
}