POST cart/{cartCollectionKey}?currentCart={currentCart}

Create new cart in cart collection, optionally set as current cart Creates new cart collection if one does not exist

Request Information

URI Parameters

NameDescriptionTypeAdditional information
cartCollectionKey

Cart collection key

string

Required

currentCart

Flag indicating if new cart should become current cart for collection

boolean

Default value is False

Body Parameters

Cart model

CartModel
NameDescriptionTypeAdditional information
Name

Required Cart Name

string

Required

Description

Cart Description

string

None.

ExtendedData

Data defined by client application

string

None.

CartItems

Array of CartItems

Collection of CartItemModel

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Description": "sample string 2",
  "ExtendedData": "sample string 3",
  "CartItems": [
    {
      "Item": "sample string 1",
      "Quantity": 2,
      "ExtendedData": "sample string 3"
    },
    {
      "Item": "sample string 1",
      "Quantity": 2,
      "ExtendedData": "sample string 3"
    }
  ]
}

application/xml, text/xml

Sample:
<CartModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>sample string 1</Name>
  <Description>sample string 2</Description>
  <ExtendedData>sample string 3</ExtendedData>
  <CartItems>
    <CartItemModel>
      <Item>sample string 1</Item>
      <Quantity>2</Quantity>
      <ExtendedData>sample string 3</ExtendedData>
    </CartItemModel>
    <CartItemModel>
      <Item>sample string 1</Item>
      <Quantity>2</Quantity>
      <ExtendedData>sample string 3</ExtendedData>
    </CartItemModel>
  </CartItems>
</CartModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int>1</int>