POST api/MallShoppingCart/AddToShoppingCart

会员 - 添加产品到购物车

Request Information

URI Parameters

None.

Body Parameters

MallShoppingCartAddProductDto
NameDescriptionTypeAdditional information
ProductId

商品标识

integer

None.

ProductCategoryIds

商品分类标识集合

Collection of integer

None.

ProductMultiPriceId

商品多价格标识

integer

None.

ProductNum

商品数量

integer

None.

Request Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonpMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: 无法访问已关闭的流。

text/json

Sample:

An exception has occurred while using the formatter 'JsonpMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: 无法访问已关闭的流。

application/xml, text/xml

Sample:
<MallShoppingCartAddProductDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mh.Mall.Service.Dto.ShoppingCart">
  <ProductCategoryIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </ProductCategoryIds>
  <ProductId>1</ProductId>
  <ProductMultiPriceId>2</ProductMultiPriceId>
  <ProductNum>3</ProductNum>
</MallShoppingCartAddProductDto>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'MallShoppingCartAddProductDto'.

Response Information

Resource Description

会员 - 添加产品到购物车

Object

None.

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonpMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: 无法访问已关闭的流。

text/json

Sample:

An exception has occurred while using the formatter 'JsonpMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: 无法访问已关闭的流。

application/xml, text/xml

Sample:
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />