虚拟购物车服务接口
接口列表
接口描述
1、电子票添加和查询(app.Shopping.ticket)
请求参数
名称 |
类型 |
是否必须 |
示例值 |
默认值 |
描述 |
method |
String |
是 |
app.Shopping.ticket |
|
请求方法 |
uid |
int |
是 |
8041886 |
|
用户ID |
product_sku |
int |
是 |
803801 |
|
产品sku |
use_yoho_coin |
double |
否 |
100 |
|
使用yoho币 |
错误编码
错误码code |
消息 |
400 |
请求参数不能为空 |
400 |
UID不能为空 |
400 |
加入商品不能为空 |
500 |
你选择的商品库存不足. |
400 |
所购商品非电子商品 |
400 |
每人只可买一张当日门票哦,不要贪心哦! |
500 |
电子票sys配置项为空 |
响应内容
{
"code": 200,
"message": "",
"data": {
"shopping_cart_data": {
"order_amount": 229,
"last_order_amount": 229,
"goods_count": 1,
"promotion_formula_list": [
{
"promotion": "总价",
"promotion_amount": "¥229"
}
],
"use_yoho_coin": 0
},
"yoho_coin": 0,
"uid": 8041886,
"goods_list": [
{
"vip_price": 0,
"sales_price": 229,
"real_price": 229,
"market_price": 479,
"last_vip_price": 229,
"last_price": 229,
"goods_images": "http://img11.static.yhbimg.com/goodsimg/2015/07/16/08/01b0816a39106c40c054b45980d18b3ff1.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
"color_name": "红色",
"product_id": 221541,
"product_name": "相对纶 原创设计抽皱圆领长裙",
"selected": "Y",
"promotion_id": 0,
"color_id": "11",
"goods_id": "293003",
"size_name": "S",
"size_id": "207",
"storage_number": "1",
"yoho_coin_num": "0",
"get_yoho_coin": "0",
"real_vip_price": 0,
"vip_discount_money": 0,
"vip_discount_type": "3",
"vip_discount": "1.00",
"vip1_price": "0.00",
"vip2_price": "0.00",
"vip3_price": "0.00",
"brand_id": "730",
"is_limited": "N",
"max_sort_id": "4",
"middle_sort_id": "31",
"small_sort_id": "134",
"is_special": "N",
"promotion_flag": "101",
"buy_number": 1,
"is_advance": "N",
"is_outlets": "B",
"attribute": "3",
"uid": 8041886,
"shopping_cart_id": 0,
"product_skn": "51125575",
"product_skc": "247803",
"product_sku": "803801",
"buy_limit": 0,
"activities_id": 0,
"expect_arrival_time": "",
"is_jit": "N",
"shop_id": 0,
"supplier_id": 0,
"shopping_cart_goods_id": 0,
"goods_type": "ordinary",
"subtotal": 229,
"str_subtotal": "¥229.00"
}
]
},
"md5": "5772d929c6a2b780bb2cd95a00c7e626"
}
2、电子票下单(app.Shopping.submitTicket)
请求参数
名称 |
类型 |
是否必须 |
示例值 |
默认值 |
描述 |
method |
String |
是 |
app.Shopping.ticket |
|
请求方法 |
uid |
int |
是 |
8041886 |
|
用户ID |
product_sku |
int |
是 |
803801 |
|
产品sku |
mobile |
String |
是 |
13814772111 |
|
手机号码 |
use_yoho_coin |
double |
否 |
100 |
|
使用yoho币 |
错误编码
错误码code |
消息 |
400 |
请求参数不能为空 |
400 |
UID不能为空 |
400 |
加入商品不能为空 |
400 |
手机号码格式错误 |
500 |
电子票sizezname属性不对。 |
500 |
你选择的商品库存不足. |
400 |
所购商品非电子商品 |
400 |
每人只可买一张当日门票哦,不要贪心哦! |
500 |
电子票sys配置项为空 |
500 |
电子票sys配置项为空 |
响应内容
{
"code": 200,
"message": "订单创建成功.",
"data": {
"order_code": "1612373774",
"payment_status": 0,
"order_amount": 229
},
"md5": "52aa3d19e0474b3a9d39044b8eadc684"
}