POST api/v1/User/ShoppingCarAdd
[需登录]新增购物车
请求信息(Request)
URI 参数
None.
Body 参数
UserShoppingCarDTO| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| ID |
购物车ID |
integer |
None. |
| UserId |
用户ID |
integer |
None. |
| Amount |
商品数量 |
integer |
Required |
| DealID |
商品ID |
integer |
Required |
| CreateTime |
添加时间 |
date |
Required |
| DealDTO |
商品详情 |
DealDTO |
None. |
| SpecificationKey |
规格关键字(Specification中的ID从小到大排列,中间以-分隔) |
string |
None. |
| SpecificationName |
规格名称,格式: 规格父类1名称:规格子类1名称,规格父类2名称:规格子类2名称。例:套餐:3-5人餐,位置:包厢 |
string |
None. |
| Images |
图片ID |
string |
None. |
| FullPathImages |
商品图片 |
string 集合 |
None. |
| Price |
当前规格单价 |
decimal number |
None. |
| Stock |
当前规格单价 |
integer |
None. |
请求格式
application/json
Sample:
text/json
Sample:
application/xml
Sample:
text/xml
Sample:
application/x-www-form-urlencoded
Sample:
响应信息(Response)
资源描述
RequestResultOfInt32| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| Data | integer |
None. |
|
| Status |
状态(0:成功,1:失败) |
integer |
None. |
| Message |
导致失败的相关消息 |
string |
None. |
| Total |
集合总数,用于分页时使用 |
integer |
None. |
响应格式
application/json, text/json
Sample:
{
"Data": 1,
"Status": 2,
"Message": "sample string 3",
"Total": 4
}
application/xml, text/xml
Sample:
<RequestResultOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application"> <Message>sample string 3</Message> <Status>2</Status> <Total>4</Total> <Data>1</Data> </RequestResultOfint>