API接口文档

订单确认

创建于 2021-10-09 / 最近更新于 2021-10-09 / 294

简要描述

订单确认

接口版本

版本号 制定人 制定日期 修订日期
1.0.0 Devil 2020-10-07

请求URL

buy/index

请求方式

POST

公共参数

参数名 是否必须 类型 默认值 描述
application string web 请求应用、参考公共中详解
application_client_type string pc 请求客户端、参考公共中详解
token string token

请求参数

{
    "buy_type": "cart",
    "ids": "189",
    "address_id": 0,
    "payment_id": 0,
    "site_model": 0,
    "is_points": 0
}
参数名 是否必须 类型 默认值 描述
buy_type array 类型(cart购物车、goods直接购买)
address_id array 地址id
payment_id int 支付方式id
site_model int 订单模式
brand_id int 品牌id
is_points array 是否使用积分
ids array 购物车购买id
goods_id array 直接购买商品id
spec array 直接购买商品规格
stock array 直接购买商品数量

返回示例

正确时返回

{
    "msg": "success",
    "code": 0,
    "data": {
        "goods_list": [
            {
                "id": "2",
                "name": "ShopXO多商户店铺",
                "alias": "",
                "lng": "0.0000000000",
                "lat": "0.0000000000",
                "province": "9",
                "city": "152",
                "county": "1896",
                "address": "浦江地铁站",
                "icon": "https://d1.shopxo.vip/static/plugins/images/shop/shop-icon.png",
                "url": "/pages/plugins/shop/detail/detail?id=1",
                "province_name": "上海市",
                "city_name": "闵行区",
                "county_name": "浦江镇",
                "goods_items": [
                    {
                        "id": "189",
                        "user_id": "2",
                        "goods_id": "6",
                        "title": "vivo X5MAX L 移动4G 八核超薄大屏5.5吋双卡手机vivoX5max",
                        "images": "https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547453000703308.jpg",
                        "original_price": 2998.9,
                        "price": 1499.45,
                        "stock": "1",
                        "spec": null,
                        "add_time": "1633702301",
                        "upd_time": "0",
                        "inventory_unit": "步",
                        "is_shelves": "1",
                        "is_delete_time": "0",
                        "buy_min_number": "1",
                        "buy_max_number": "888",
                        "model": "",
                        "site_type": "2",
                        "is_invalid": 0,
                        "inventory": "888",
                        "spec_weight": "0",
                        "spec_coding": "",
                        "spec_barcode": "",
                        "extends": "{\"plugins_distribution_rules_1\":\"r|10\\nr|10\\nr|10\",\"plugins_distribution_down_rules_1\":\"\"}",
                        "goods_url": "https://d1.shopxo.vip/goods/index/id/6.html",
                        "images_old": "/static/upload/images/goods/2019/01/14/1547453000703308.jpg",
                        "total_price": "1499.45",
                        "is_error": 0,
                        "error_msg": ""
                    }
                ],
                "order_base": {
                    "total_price": "1499.45",
                    "actual_price": "1499.45",
                    "preferential_price": 0,
                    "increase_price": 0,
                    "goods_count": 1,
                    "spec_weight_total": 0,
                    "buy_count": 1,
                    "address": {
                        "id": 0,
                        "logo": "https://d1.shopxo.vip/static/upload/images/plugins_shop/user_shop/4148/2021/04/15/1618475981109734.jpg",
                        "alias": "ShopXO多商户店铺",
                        "name": "devil",
                        "tel": "13222333344",
                        "lng": "0.0000000000",
                        "lat": "0.0000000000",
                        "address": "浦江地铁站",
                        "province": "9",
                        "city": "152",
                        "county": "1896",
                        "province_name": "上海市",
                        "city_name": "闵行区",
                        "county_name": "浦江镇"
                    },
                    "extraction_address": [
                        {
                            "id": 0,
                            "logo": "https://d1.shopxo.vip/static/upload/images/plugins_shop/user_shop/4148/2021/04/15/1618475981109734.jpg",
                            "alias": "ShopXO多商户店铺",
                            "name": "devil",
                            "tel": "13222333344",
                            "lng": "0.0000000000",
                            "lat": "0.0000000000",
                            "address": "浦江地铁站",
                            "province": "9",
                            "city": "152",
                            "county": "1896",
                            "province_name": "上海市",
                            "city_name": "闵行区",
                            "county_name": "浦江镇"
                        }
                    ],
                    "site_model": "2",
                    "common_site_type": "2",
                    "extension_data": []
                }
            }
        ],
        "payment_list": [
            {
                "id": "1",
                "logo": "",
                "name": "现金支付",
                "sort": "0",
                "payment": "CashPayment",
                "apply_terminal_old": [
                    "pc",
                    "h5",
                    "ios",
                    "android",
                    "weixin",
                    "alipay",
                    "baidu",
                    "toutiao",
                    "qq"
                ],
                "logo_old": ""
            }
        ],
        "base": {
            "total_price": "1499.45",
            "actual_price": "1499.45",
            "preferential_price": 0,
            "increase_price": 0,
            "goods_count": 1,
            "spec_weight_total": 0,
            "buy_count": 1,
            "address": {
                "id": 0,
                "logo": "https://d1.shopxo.vip/static/upload/images/plugins_shop/user_shop/4148/2021/04/15/1618475981109734.jpg",
                "alias": "ShopXO多商户店铺",
                "name": "devil",
                "tel": "13222333344",
                "lng": "0.0000000000",
                "lat": "0.0000000000",
                "address": "浦江地铁站",
                "province": "9",
                "city": "152",
                "county": "1896",
                "province_name": "上海市",
                "city_name": "闵行区",
                "county_name": "浦江镇"
            },
            "extraction_address": [
                {
                    "id": 0,
                    "logo": "https://d1.shopxo.vip/static/upload/images/plugins_shop/user_shop/4148/2021/04/15/1618475981109734.jpg",
                    "alias": "ShopXO多商户店铺",
                    "name": "devil",
                    "tel": "13222333344",
                    "lng": "0.0000000000",
                    "lat": "0.0000000000",
                    "address": "浦江地铁站",
                    "province": "9",
                    "city": "152",
                    "county": "1896",
                    "province_name": "上海市",
                    "city_name": "闵行区",
                    "county_name": "浦江镇"
                }
            ],
            "site_model": "2",
            "common_site_type": "2"
        },
        "common_site_type": 2,
        "plugins_points_data": {
            "user_integral": 39,
            "use_integral": 39,
            "group_integral": {
                "2": 1000000
            },
            "discount_type": 0,
            "discount_price": "39.00",
            "is_checked": 0
        },
        "plugins_coupon_data": [
            {
                "warehouse_id": "2",
                "warehouse_name": "ShopXO多商户店铺",
                "coupon_data": {
                    "coupon_list": [
                        {
                            "id": "90",
                            "coupon_id": "1",
                            "user_id": "2",
                            "time_start": "1632311962",
                            "time_end": "1640347162",
                            "is_valid": "1",
                            "is_expire": "0",
                            "is_use": "0",
                            "use_order_id": "0",
                            "use_time": "0",
                            "add_time": "1632311962",
                            "upd_time": "1633702207",
                            "coupon": {
                                "name": "满100减5元",
                                "desc": "满100减5元",
                                "type": "0",
                                "bg_color": "0",
                                "expire_type": "0",
                                "discount_value": "5",
                                "use_limit_type": "0",
                                "use_value_ids": "",
                                "where_order_price": "100.00",
                                "type_name": "满减劵",
                                "type_unit": "元",
                                "bg_color_name": "红色",
                                "bg_color_value": "#D2364C",
                                "expire_type_name": "领取生效",
                                "use_limit_type_name": "全场适用",
                                "use_value_ids_all": []
                            },
                            "is_use_name": "否",
                            "is_expire_name": "否",
                            "is_valid_name": "是",
                            "use_time_time": "",
                            "time_start_text": "2021-09-22 19:59",
                            "time_end_text": "2021-12-24 19:59",
                            "add_time_time": "2021-09-22 19:59:22",
                            "upd_time_time": "2021-10-08 22:10:07",
                            "buy_goods_ids": [
                                "6"
                            ]
                        }
                    ],
                    "coupon_choice": null
                }
            }
        ]
    }
}

错误时返回

{
    "msg": "error",
    "code": -1,
    "data": []
}

返回参数说明 -> data

参数名 是否必须 类型 描述
common_site_type int 站点类型
base array 基础信息
goods_list array 商品列表
payment_list array 支付方式
plugins_points_data array 积分商城 - 插件
plugins_coupon_data array 优惠券 - 插件

备注

更多返回错误代码请看首页的错误代码描述

0 人点赞过