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 totrue
. This allows you to activate your custom discounts from external services. By default, this setting is determined by the cart settings configured for the store. - 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.
You cannot use both custom discounts and rule promotions at the same time.
Errors
The following error is received if you enable a cart to use both custom discounts and rule promotions:
{
"status": 422,
"title": "Cannot use both discounts together",
"detail": "Only one discount setting can be set to true at a time."
}
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.
When set to true
, this parameter allows the cart to use rule promotions.
This optional parameter sets a reference date for the cart. If this parameter is set, it allows the cart to act as one that might occur on that specified date. For example, such future carts might acquire future-enabled discounts, allowing users to test and validate future interactions with carts. The snapshot_date must be in the format 2026-02-21T15:07:25Z
. By default, this parameter is left empty.
Responses
- 200
- 400
- default
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.
When set to true
, this parameter allows the cart to use rule promotions.
This optional parameter sets a reference date for the cart. If this parameter is set, it allows the cart to act as one that might occur on that specified date. For example, such future carts might acquire future-enabled discounts, allowing users to test and validate future interactions with carts. The snapshot_date must be in the format 2026-02-21T15:07:25Z
. By default, this parameter is left empty.
{
"data": {
"type": "settings",
"cart_expiry_days": 25,
"discounts": {
"custom_discounts_enabled": false,
"use_rule_promotions": false
},
"snapshot_date": "2026-02-21T15:07:25Z"
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
- bad-request-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "enum",
"source": "data.type",
"detail": "data.type must be one of the following: \"settings\""
}
]
}
Internal server error.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}