POST 3dCartWebAPI/v1/Cart/{orderkey}/Item
Adds a new item to a cart
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
orderkey |
Order Key |
string |
Required |
Body Parameters
A Json or XML object containing the new cart item
CartItemPostName | Description | Type | Additional information |
---|---|---|---|
CatalogID |
database reference = oitems.catalogid |
integer |
None. |
ItemQuantity |
database reference = oitems.numitems |
decimal number |
None. |
ItemOptions | Collection of CartItemOption |
None. |
Request Formats
application/json, text/json
Sample:
{ "CatalogID": 1, "ItemQuantity": 1.1, "ItemOptions": [ { "OptionSetID": 1, "OptionID": 1, "OptionValue": "sample string 1" }, { "OptionSetID": 1, "OptionID": 1, "OptionValue": "sample string 1" } ] }
application/xml, text/xml
Sample:
<CartItemPost xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <CatalogID>1</CatalogID> <ItemQuantity>1.1</ItemQuantity> <ItemOptions> <CartItemOption> <OptionSetID>1</OptionSetID> <OptionID>1</OptionID> <OptionValue>sample string 1</OptionValue> </CartItemOption> <CartItemOption> <OptionSetID>1</OptionSetID> <OptionID>1</OptionID> <OptionValue>sample string 1</OptionValue> </CartItemOption> </ItemOptions> </CartItemPost>
Sample Request |
|
Response Information
application/json, text/json
Sample:
[ { "Key":"CartItemID", "Value":"123", "Status":"201", "Message":"Created successfully", } ]
Resource Description
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |