Newer Version Available
Commerce Webstore Checkouts
If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.
- Resource
-
1/commerce/webstores/webstoreId/checkouts - Available version
- 55.0
- HTTP methods
- POST, PUT
- PUT is supported in version 57.0 and later.
To resolve a 409 error returned on a POST or PUT request, retry your request until it returns a 2xx status with updated data. To avoid returning a 409 error on POST or PUT requests, make sure that you don’t have any custom code that modifies the cart or a checkout session while calling POST or PUT.
- Request parameters
-
Parameter Name Type Description Required or Optional Available Version effectiveAccountId 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 55.0
- Request body for POST and PUT
-
- Root XML tag
- <checkoutStart>
- JSON example
-
1{ 2 "cartId": "0a6456789012345AAA", 3 "customFields": [ 4 { 5 "attributes": { 6 "type": "WebCart" 7 }, 8 "CartCustomNumberField__c": 1, 9 "CartCustomTextField__c": "Text1" 10 }, 11 { 12 "attributes": { 13 "type": "CartDeliveryGroup" 14 }, 15 "CdgDistrict__c": "District1", 16 }, 17 { 18 "attributes": { 19 "type": "CartDeliveryGroup" 20 }, 21 "id": "0a7xx000000006TAAQ", 22 "CdgWardField__c": 8 23 } 24 ] 25} - Properties
-
Name Type Description Required or Optional Available Version cartId String ID of a cart, or the value active, which indicates that the checkout operation should use the active cart. Required 55.0 customFields sObject Attributes Input Array of sObjects with their respective custom fields. Currently, custom fields are supported on the WebCart and CartDeliveryGroup entities. You can specify up to 21 sObjects in the array: one WebCart and multiple CartDeliveryGroups.
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. We currently don’t support updating the country and state fields through customFields as part of the address update using request. Instead, specify the countryCode and stateCode.
Use the yyyy-MM-dd format to specify date fields.
Use the yyyy-MM-ddTHH:mm:ss.SSS+/-HH:mm or yyyy-MM-ddTHH:mm:ss.SSSZ formats to specify dateTime fields. When a timezone is added to a UTC dateTime, the result is the date and time in that timezone.
Use the HH:mm.ss.SSS or HH:mm.ss.SSSZ formats to specify time fields. When a timezone is added to a UTC time, the result is the time in that timezone.
The customFields property isn't supported in stores built on an Aura template.
Optional 62.0 deliveryAddressInput Checkout Start Address Input Address data used for the delivery address. Optional 61.0
- Response body for POST and PUT
- Checkout