接口地址:http://yesx2.com/api/platform.php?s=Platform.Mall_Mall.PreviewOrder  

接口描述: 订单预览

接口参数

参数名字类型是否必须默认值其他说明
access_token字符串可选访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口
product_id整型必须-最小:1产品套餐ID
num整型可选1最小:1购买数量
order_id字符串可选-订单号

返回字段

返回结果类型说明
ret整型状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误
data对象或混合类型业务数据,由各自接口指定,通常为对象
data.product对象商品信息
data.pricedouble订单总价
msg字符串提示信息,失败时的错误提示

在线测试   


参数是否必须
service 必须
access_token 可选
product_id 必须
num 可选
order_id 可选

客户端请求示例

{
    "ret": 200,
    "data": {
        "product": {
            "id": 3,
            "product_name": "条形码流量套餐",
            "product_key": "App.BarCode.Gen",
            "product_type": "api_buy",
            "price": "1.00",
            "original_price": "0.00",
            "amount": 3,
            "expire_time": 2592000,
            "product_desc": null,
            "product_status": 1,
            "add_time": "2020-09-14 16:32:59",
            "expire_time_desc": "1个月",
            "product_key_lower": "app.barcode.gen"
        },
        "price": 3,
        "num": 3,
        "other_product_list": [
            {
                "key": 3,
                "name": "3次/1.00元"
            },
            {
                "key": 4,
                "name": "22次/2.00元"
            }
        ],
        "order_amount_list": [
            {
                "key": 1,
                "name": 1
            },
            {
                "key": 2,
                "name": 2
            },
            {
                "key": 3,
                "name": 3
            },
            {
                "key": 4,
                "name": 4
            },
            {
                "key": 5,
                "name": 5
            },
            {
                "key": 6,
                "name": 6
            },
            {
                "key": 7,
                "name": 7
            },
            {
                "key": 8,
                "name": 8
            },
            {
                "key": 9,
                "name": 9
            },
            {
                "key": 10,
                "name": 10
            }
        ]
    },
    "msg": ""
}

错误列表

错误状态码错误描述信息
400ret=400,客户端参数错误或非法请求
404表示接口服务不存在
406ret=406,access_token令牌校验不通过
407ret=407,app_key权限不足,或未知应用
408ret=408,当前用户禁止使用,或用户未登录
409ret=409,接口流量不足
500表示服务端内部错误

本文档生成时间:2024-03-29 09:21:48