POST 3dCartWebAPI/v1/Cart/{orderkey}/Item


Adds a new item to a cart

Request Information

URI Parameters

NameDescriptionTypeAdditional information
orderkey

Order Key

string

Required

Body Parameters

A Json or XML object containing the new cart item

CartItemPost
NameDescriptionTypeAdditional 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:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_3dCartWebAPI.Models">
  <CatalogID>1</CatalogID>
  <ItemOptions>
    <CartItemOption>
      <OptionID>1</OptionID>
      <OptionSetID>1</OptionSetID>
      <OptionValue>sample string 1</OptionValue>
    </CartItemOption>
    <CartItemOption>
      <OptionID>1</OptionID>
      <OptionSetID>1</OptionSetID>
      <OptionValue>sample string 1</OptionValue>
    </CartItemOption>
  </ItemOptions>
  <ItemQuantity>1.1</ItemQuantity>
</CartItemPost>

Sample Request



Response Information

application/json, text/json

Sample:
[
  {
    "Key":"CartItemID",
    "Value":"123",
    "Status":"201",
    "Message":"Created successfully",
  }
]
							

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.