文档
测试

购物车详情

GET
route=checkout/cart_info/getHomePickCartDetail&cart_id=1718840

接口描述

点击编辑时调用该接口

响应参数说明

参数名
类型
描述
必填
code
int
示例:200
必填
msg
string
示例:Successfully.
必填
data
object
数据字典
必填
cart_id
int
购物车cart_id
必填
sku
string
商品sku
必填
product_id
int
商品ID
必填
original_product_id
int | null
现货头款产品对应的协议产品id
必填
product_name
string
商品名称
必填
stock_type_str
string
采购方式名称 /仓库随机/仓库指定/空
必填
stock_type
INT
采购类型 1:仓库随机 2:仓库指定,默认为1
必填
qty
int
qty小计
必填
stock_distribution
数组对象
用户选择的仓库信息
必填
warehouse_code
必填
qty
必填
wh_id
必填
warehouse_distribution
数组对象
现货尾款的仓库分布,,(如果不是现货尾款 全部返回空数组)
必填
wh_id
int
仓库id
必填
warehouse_code
string
仓库code
必填
qty
int
qty
必填
other_qty
int
其他库存,复杂交易
必填
store_events_qty
int
store_events_qty(活动库存),复杂交易时固定=0,
必填
transaction_type_list
array
可选择的交易类型,key为协议id,key=0时且array只有1个对象时,那就只存在一种普通交易
必填
id
int
必填
type
int
协议类型 1:Rebate 2:Margin 3: Future Goods 4:Spot Price
必填
agreement_code
string
协议号
必填
expire_time
string
必填
agreement_price
string
必填
agree_price
string
示例:200.00
必填
price
int
示例:160
必填
version
object
示例:null
必填
product_id
int
示例:327496
必填
day
int
示例:30
必填
qty
int
示例:5
必填
left_qty
int
示例:5
必填
deposit_per
string
示例:40.00
必填
price_all
float
示例:191.92
必填
price_all_show
string
示例:$191.92
必填
price_show
string
示例:$160.00
必填
agree_price_show
string
示例:$200.00
必填
agreement_name
string
示例:Margin
必填
left_time_secs
int
示例:175357
必填
agreement_id_selected
int
选中的交易类型的id ,, 0是普通交易
必填
is_use_discount
bool
是否使用了折扣 true / false
必填
transaction_type
int
交易类型,0-普通 1 -返点 2 -现货 3 -期货 4-议价
必填
product_type
int
产品类型 0 普通 1现货头款 2 期货头款
必填
use_discount
int
使用的折扣
必填
is_with_drop_ship_performer
bool
是否满足这个条件 (自付运费Buyer共同履约,为一件代发Buyer签署的现货协议付尾款),当为true时 不可以编辑采购方式
必填
stock_cloud_fee
出云费
必填
price
单价
必填
qty_exception
bool
数量是否异常
必填
stock_exception
bool
库存分布是否异常
必填
saleable_qty
saleable_qty(活动+非活动 ,相加),,
必填

说明 / 示例

**1.失败时返回** { "code": 0, "msg": "Failed." } **2.transaction_type** 这个数组对象里面不包含普通类型Normal Transaction ,只包含复杂交易 协议类型 1:Rebate 2:Margin 3: Future Goods 4:Spot Price 协议类型取transaction_type.type 协议号取agreement_code ![image.png](https://cos.easydoc.net/38367400/files/l4qnufoq.png) ![image.png](https://cos.easydoc.net/38367400/files/l5dohrkw.png) **2 点击submit以后 ** 1.商品失效 刷新页面 101 2.商品数量超出 刷新弹窗 102 3.库存分布不满足 刷新弹窗 102 4.协议失效 刷新单条数据(类似200的时候) 103 4.表单校验错误 其他 ![image.png](https://cos.easydoc.net/38367400/files/l5w4x2vh.png)

返回参数示例

```json { "code": 200, "msg": "Successfully.", "data": { "cart_id": 1720370, "sku": "WFFDPL1201", "price":133, "stock_cloud_fee":12, "product_id": 3334436, "product_name": "WFFDPL1201", "product_type": 0, "transaction_type": 2, "stock_type_str": "仓库指定", "stock_type": 2, "stock_distribution": [ { "warehouse_code": "MM02_LC", "qty": 1, "wh_id": 620 }, { "warehouse_code": "LC_ONE", "qty": 1, "wh_id": 636 } ], "warehouse_distribution": [ { "qty": 0, "wh_id": 1, "warehouse_code": "CA1" }, { "qty": 0, "wh_id": 86, "warehouse_code": "AT3" }, { "qty": 0, "wh_id": 588, "warehouse_code": "COASTER-LD-1" }, { "qty": 0, "wh_id": 591, "warehouse_code": "COASTER-NJ" }, { "qty": 20, "wh_id": 620, "warehouse_code": "MM02_LC" }, { "qty": 0, "wh_id": 621, "warehouse_code": "MM02-SF" }, { "qty": 20, "wh_id": 622, "warehouse_code": "MM02_LD" }, { "qty": 35, "wh_id": 630, "warehouse_code": "MM02_CH" }, { "qty": 20, "wh_id": 636, "warehouse_code": "LC_ONE" }, { "qty": 20, "wh_id": 657, "warehouse_code": "test0020" }, { "qty": 0, "wh_id": 686, "warehouse_code": "IPX2" }, { "qty": 0, "wh_id": 687, "warehouse_code": "cyx-onsite-test" } ], "qty": 2, "saleable_qty": 5, "transaction_type_list": [ { "id": 0, "type": 0, "left_qty": 50, "agreement_name": "Normal Transaction" }, { "id": 15585, "expire_time": "2022-08-17 23:59:59", "agreement_price": "8.00", "agreement_code": "20220718694549", "agree_price": "8.00", "price": 6.4, "product_id": 3334436, "day": 30, "qty": 5, "left_qty": 3, "deposit_per": "1.60", "version": null, "price_all": 19.54, "price_all_show": "$19.54", "price_show": "$6.40", "agree_price_show": "$8.00", "agreement_name": "Margin", "type": 2, "left_time_secs": 2418881 }, { "id": 15586, "expire_time": "2022-08-17 23:59:59", "agreement_price": "10.00", "agreement_code": "20220718185468", "agree_price": "10.00", "price": 8, "product_id": 3334436, "day": 30, "qty": 5, "left_qty": 5, "deposit_per": "2.00", "version": null, "price_all": 21.14, "price_all_show": "$21.14", "price_show": "$8.00", "agree_price_show": "$10.00", "agreement_name": "Margin", "type": 2, "left_time_secs": 2418881 }, { "id": 15587, "expire_time": "2022-08-17 23:59:59", "agreement_price": "10.00", "agreement_code": "20220718322557", "agree_price": "10.00", "price": 8, "product_id": 3334436, "day": 30, "qty": 5, "left_qty": 3, "deposit_per": "2.00", "version": null, "price_all": 21.14, "price_all_show": "$21.14", "price_show": "$8.00", "agree_price_show": "$10.00", "agreement_name": "Margin", "type": 2, "left_time_secs": 2418881 }, { "id": 15590, "expire_time": "2022-08-17 23:59:59", "agreement_price": "10.00", "agreement_code": "20220718584538", "agree_price": "10.00", "price": 8, "product_id": 3334436, "day": 30, "qty": 5, "left_qty": 2, "deposit_per": "2.00", "version": null, "price_all": 21.14, "price_all_show": "$21.14", "price_show": "$8.00", "agree_price_show": "$10.00", "agreement_name": "Margin", "type": 2, "left_time_secs": 2418881 }, { "id": 15606, "expire_time": "2022-08-19 23:59:59", "agreement_price": "20.00", "agreement_code": "20220720797172", "agree_price": "20.00", "price": 16, "product_id": 3334436, "day": 30, "qty": 5, "left_qty": 5, "deposit_per": "4.00", "version": null, "price_all": 29.14, "price_all_show": "$29.14", "price_show": "$16.00", "agree_price_show": "$20.00", "agreement_name": "Margin", "type": 2, "left_time_secs": 2591681 } ], "agreement_code_selected": 15606, "is_use_discount": false, "is_with_drop_ship_performer": false, "use_discount": null } } ```