Newer Version Available

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

Commerce Webstore Cart, Arrange Items

Arrange cart items into delivery groups.
Resource
1/commerce/webstores/webStoreId/carts/cartStateOrId/delivery-groups/actions/arrange-items
Values for cartStateOrId are:
  • cartId—ID of the cart.
  • active—Active cart. This value should only be used for authenticated users.
  • current—Cart that isn’t closed or pending deletion. Available in version 50.0 and later.
Available version
60.0
HTTP methods
POST

In API version 63.0 and later, if your store has simplified cart cleanup enabled, a POST request can arrange cart items into delivery groups without canceling checkout.

Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
deleteEmpty​DeliveryGroups Boolean Specifies whether to delete delivery groups with no cart items (true) or not (false). If unspecified, the default value is true. Required 63.0
Request body for POST
Root XML tag
<cart>
JSON example
1{
2   "arrangements":[
3      {
4         "deliveryGroupId":"0a7xx000000004rAAA",
5         "cartItemId":"0a9xx000000004rAAA",
6         "quantity":"5"
7      }
8      {
9         "deliveryGroupId":"0a7xx000000007dAAY",
10         "cartItemId":"0a9xx000000005yAAY",
11         "quantity":"0"
12      }
13   ]
14}
Properties
Name Type Description Required or Optional Available Version
arrangements Item Arrange Input[] Set of instructions to arrange cart items into delivery groups. Optional 59.0
Response body for POST
Delivery Group Collection
Successful POST requests return a 202 status.