Cart Input

A cart.
Root XML tag
<cart>
JSON example

This cart input creates a cart for the specified account using the provided currency, USD, in an org with the multicurrency feature enabled.

1{
2   "name":"My Cart",
3   "type":"Cart",
4   "currencyIsoCode": "USD",
5   "effectiveAccountId": "001OL000002LC0qYAG"
6}
JSON example with custom fields

This cart input creates a cart with custom fields from the WebCart sObject. Custom fields are optional and must be previously defined for the sObject. See Create Custom Fields.

1{
2   "name":"My Cart with Custom Fields",
3   "type":"Cart",
4   "currencyIsoCode": "USD",
5   "effectiveAccountId": "001OL000002LC0qYAG",
6   "customFields":[
7      {
8         "attributes":{
9            "type":"WebCart"
10         },
11         "MyCustomTextField__c": "Text",
12         "MyCustomNumberField__c": 12.34,
13         "MyCustomPercentField__c" : 0.2345,
14         "MyCustomGeolocationField__c": {
15            "latitude": 33.345,
16            "longitude": 45.567
17        }
18      }
19   ]
20}
Properties
Name Type Description Required or Optional Available Version
currencyIsoCode String Currency ISO code of the cart. Optional 57.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 WebCart 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. Optional 61.0
effective​AccountId String ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. Optional 49.0
isSecondary Boolean Specifies whether the cart is secondary (true) or not (false). If unspecified, defaults to false. Optional 53.0
name String Name of the cart. The name can have up to 250 Unicode characters. If unspecified, defaults to the generated name. Optional 49.0
orderOwnerId String ID of the owner of the order. Optional 58.0
type String Type of cart. Values are:
  • Cart—Cart created by a customer.
  • PayNowReadOnly—Clone of a Template cart that the customer can check out with using the Pay Now feature.
  • Template—Cart created by an internal user.
If unspecified, defaults to Cart.
Optional 49.0
typeAsString String Type of the cart provided as a string. Optional 59.0