yohood.md 7.3 KB

1.商品详情(app.product.data)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E5%95%86%E5%93%81%E5%88%97%E8%A1%A8/product.md

2.电子票添加(app.shopping.ticket)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/%E8%99%9A%E6%8B%9F%E8%B4%AD%E7%89%A9%E8%BD%A6.md

3.电子票下单(app.shopping.submitTicket)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/%E8%99%9A%E6%8B%9F%E8%B4%AD%E7%89%A9%E8%BD%A6.md

4.订单列表(app.SpaceOrders.get)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/order.md

5.订单详情(app.SpaceOrders.detail)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/order.md

6.获取电子票列表(app.SpaceOrders.getQrByOrderCode)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/order.md

7.根据用户ID(通过手机号或邮箱获取用户ID)获取多个电子票列表(app.SpaceOrders.getQrByUid)

http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E8%AE%A2%E5%8D%95/order.md

虚拟购物车服务接口

接口列表

接口名称 接口描述
app.shopping.ticket 电子票添加和查询
app.shopping.submitTicket 电子票下单

接口描述

1、电子票添加(app.shopping.ticket)

请求参数

名称 类型 是否必须 示例值 默认值 描述
method String app.shopping.ticket 请求方法
uid int 8041886 用户ID
product_sku int 803801 产品sku
buy_number int 1 购买数量,范围1-4
use_yoho_coin double 0.05 使用yoho币金额(单位元)
client_type String iphone 客户端类型,请求来源哪一端

错误编码


错误码code 消息
400 请求参数不能为空
400 UID不能为空
400 加入商品不能为空
500 你选择的商品库存不足.
400 所购商品非电子商品
500 每人每场只可买4张票,不要贪心哦!

响应内容

{
    "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.submitTicket 请求方法
uid int 8041886 用户ID
product_sku int 803801 产品sku
buy_number int 1 购买数量,范围1-4
mobile String 13814772111 手机号码
use_yoho_coin double 0.05 使用yoho币金额,单位(元)
client_type String iphone 客户端类型,请求来源哪一端
qhy_union String 联盟参数,json格式

qhy_union入参

{
    "go_url": "http://m.yohobuy.com/?utm_source=dmwwap&utm_medium=none&utm_campaign=dmwwap",
    "channel_code": "174168585",
    "append": null,
    "client_id": 3019,
    "mbr_name": "174168585",
    "u_id": null
}     

错误编码


错误码code 消息
400 请求参数不能为空
400 UID不能为空
400 加入商品不能为空
400 手机号码格式错误
500 电子票sizezname属性不对。
500 你选择的商品库存不足.
400 所购商品非电子商品
400 每人每场只可买4张票,不要贪心哦!
500 电子票sys配置项为空

响应内容

{
    "code": 200,
    "message": "订单创建成功.",
    "data": {
        "order_code": "1612373774",
        "payment_status": 0,
        "order_amount": 229
    },
    "md5": "52aa3d19e0474b3a9d39044b8eadc684"
}

注意

1. 发放电子票(issueTicket)有三处使用:(1)电子票下单(ShoppingTicketService.submitTicket) (2)app支付成功(YohoOrderServiceImpl.paySuccess)(3)PC支付成功(YohoOrderServiceImpl.updateOrderPaymentStatusById)

2. 插入待评价记录(addOrderGoodsToComment)有两处使用:(1)app支付成功(YohoOrderServiceImpl.paySuccess)(2)PC订单状态修改成功(YohoOrderServiceImpl.updateOrderStatusById)

3.发短信需要配置:调用运维发送短信接口时的,需要传入的密码(AES加密)sendSMS.password=7jVEde87bLffoTnt6tGxmw==