Feature Pack 5Feature Pack 6Feature Pack 4

Add order items to cart

The following example shows how to add order items to cart.

Request


POST /wcs/resources/store/10101/cart HTTP/1.1
Host: wcstestserver.raleigh.ibm.com
Content-Type: application/json

{
   "orderItem": [
      {
         "productId": "10541",
         "quantity": "2.0",
         "itemAttributes": [
         	{
         		"attrName": "10297",
         		"attrValue": "4T"
         	}
         ]	
      },
      {
         "productId": "10823",
         "quantity": "3.0"
      },
      {
         "productId": "10260",
         "quantity": "1.0"
      }
   ]      
}

Response


HTTP/1.1 201 Created
Content-Type: application/json

{
	"orderId": "14501",
	"orderItem": [
		{
			"orderItemId": "60002"
		},
		{
			"orderItemId": "60001"
		},
		{
			"orderItemId": "60003"
		}
	]
}