文档
测试

更新购物车

POST
shopping-carts

接口描述

更新购物车(包含新增和更新商品数量)

请求头

参数名
类型
描述
必填
Authorization
string
JWT <token>
必填

请求参数

参数名
类型
描述
必填
goods-inventory
int
商品库存ID
必填
amount
int
商品数量
必填

响应参数

参数名
类型
描述
必填
created_count
int
新增商品数量
必填
updated_count
int
更新商品数量
必填

说明 / 示例

请求参数支持批量更新array ```json [ { "goods_inventory": 3, "amount": 2 }, { "goods_inventory": 5, "amount": 1 } ] ``` 或者单个object ```json { "goods_inventory": 3, "amount": 2 } ``` 更新成功, 返回更新信息 ```json { "created_count": 0, "updated_count": 2 } ```