Set the visibility for cart messages.
Operation ID: postCartMessagesVisibilityThe visibility settings for cart messages enable real-time updates and notifications, ensuring customers stay informed about changes to their carts, such as item availability, price adjustments, or promotional offers.
curl "https://{yourinstance}.salesforce.com/services/data/v64.0/commerce/webstores/{webstoreId}/carts/{activeCartOrId}/messages/actions/set-visibility" \
-X POST \
-H "content-type: application/json" \
-d '{
"visibility": true
}'
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).
The ID of the web store.
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.
{
"visibility": true
}
Indicates whether to set cart messages as visible (true) or not (false).
Success
{
"visibility": false
}
Indicates whether cart messages are set to visible (true) or not (false).