Newer Version Available

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

Cart Item Input

An item in a cart.
Root XML tag
<cartItem>
JSON example for adding an item to a cart
1{
2   "productId":"01t000000000000000",
3   "quantity":"5",
4   "type":"Product"
5}
JSON example for updating an item in a cart
1{
2   "quantity":"7"
3}
Properties
Name Type Description Required or Optional Available Version
cartDelivery​GroupId String ID of the cart delivery group. Optional 59.0
custom​Fields sObject Attributes Input[] Array of sObjects and custom fields for the sObjects. Standard fields are ignored. The custom fields must already be defined for the sObject. Currently, only the CartItem sObject is supported. Field-level security rules from the shopper profile are applied to the custom fields. The rules are applied for registered shoppers and for the guest shopper profile. The custom fields can be of type Checkbox, Currency, Date, Email, LongTextArea, Number, Percent, Phone, Text, TextArea, Url, Address, or Location. The customFields property isn't supported in stores built on an Aura template. Optional 61.0
productId String ID of the product. Required when adding an item to a cart (POST)

Not supported when updating an item in a cart (PATCH)

49.0
productSelling​ModelId String Reserved for future use. Optional 59.0
quantity String Quantity of the cart item. Use a value that can be converted to BigDecimal. Required 49.0
subscriptionTerm Integer Reserved for future use. Optional 59.0
type String Type of item in a cart. Value is Product. Required when adding an item to a cart (POST)

Not supported when updating an item in a cart (PATCH)

49.0