Feature Pack 7

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: testserver.mycompany.com
Content-Type: application/json

{
   "orderItem": [ 
      {
	     "productId": "10541",
		 "quantity": "2.0",
		 "xitem_field1": "1",
		 "xitem_field2": "2.0"
	  }, 
	  {
	     "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"
		}
	]
}