简要描述
请求url
- https://www.商城域名.com/index.php?s=/api/checkout/order
请求方式
是否需授权登录
请求header
| 参数名 | 类型 | 是否必须 | 示例值 | 说明 | 
| storeId | int | 必填 | 10001 | 商城ID | 
| platform | string | 必填 | H5 | 当前请求的客户端(APP、小程序、H5等) | 
| Access-Token | string | 选填 | - | 当前登录用户的 Token | 
请求参数
| 参数名 | 类型 | 是否必须 | 示例值 | 说明 | 
| mode | string | 必填 | buyNow | 结算模式(buyNow立即购买 cart购物车) | 
| delivery | int | 必填 | 10 | 配送方式(10快递配送 20上门自提) | 
| shopId | int | 必填 | 0 | 自提门店ID | 
| couponId | int | 必填 | 0 | 优惠券ID | 
| isUsePoints | int | 必填 | 0 | 是否使用积分抵扣(1使用 0不使用) | 
| cartIds | string | 必填 | 28,30 | 购物车ID集 | 
返回示例
{
  "status": 200,
  "message": "success",
  "data": {
    "order": {
      "goodsList": [
        {
          "goods_id": 10019,
          "goods_name": "清野の木 56L灰色特大号 塑料收纳箱整理箱环保加厚储物箱",
          "goods_no": "",
          "video_id": 0,
          "video_cover_id": 0,
          "selling_point": "",
          "spec_type": 10,
          "goods_price_min": "31.50",
          "goods_price_max": "31.50",
          "line_price_min": "0.00",
          "line_price_max": "0.00",
          "stock_total": 83,
          "delivery_id": 10001,
          "is_points_gift": 1,
          "is_points_discount": 1,
          "is_alone_points_discount": 0,
          "points_discount_config": "",
          "is_enable_grade": 1,
          "is_alone_grade": 0,
          "alone_grade_equity": [],
          "status": 10,
          "is_ind_dealer": 0,
          "dealer_money_type": 10,
          "first_money": "0.00",
          "second_money": "0.00",
          "third_money": "0.00",
          "goods_images": [
            {
              "file_id": 10364,
              "file_type": 10,
              "preview_url": "2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg"
            }
          ],
          "goods_image": "2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg",
          "goods_sales": 203,
          "is_user_grade": true,
          "skuInfo": {
            "id": 10525,
            "goods_sku_id": "0",
            "goods_id": 10019,
            "image_id": 0,
            "goods_sku_no": "",
            "goods_price": "32.14",
            "line_price": "0.00",
            "stock_num": 83,
            "goods_weight": 0,
            "goods_props": null,
            "spec_value_ids": null
          },
          "goods_price": "32.14",
          "total_num": 3,
          "goods_sku_id": "0",
          "total_price": "94.49",
          "grade_ratio": "9.8",
          "grade_goods_price": "31.50",
          "grade_total_money": "1.93",
          "coupon_money": 0,
          "max_points_num": 0,
          "pointsNum": 0,
          "points_money": 0,
          "total_pay_price": "94.49",
          "expressPrice": 0,
          "points_bonus": "4"
        }
      ],
      "orderTotalNum": 3,
      "couponList": [],
      "hasError": false,
      "errorMsg": "",
      "delivery": 10,
      "address": {
        "address_id": 10052,
        "name": "test",
        "phone": "13212341234",
        "province_id": 1,
        "city_id": 2,
        "region_id": 3,
        "detail": "125125",
        "user_id": 10125,
        "region": {
          "province": "北京",
          "city": "北京市",
          "region": "东城区"
        }
      },
      "existAddress": true,
      "expressPrice": "0.00",
      "isIntraRegion": true,
      "extractShop": [],
      "isAllowPoints": false,
      "isUsePoints": "0",
      "pointsMoney": 0,
      "pointsBonus": 4,
      "lastExtract": {},
      "orderTotalPrice": "94.49",
      "couponId": 0,
      "couponMoney": 0,
      "orderPrice": "94.49",
      "orderPayPrice": "94.49"
    },
    "personal": {
      "user_id": 10125,
      "balance": "91656.64",
      "points": 64,
      "address_id": 10052
    },
    "setting": {
      "deliveryType": [
        10,
        20
      ],
      "points_name": "积分",
      "points_describe": ""
    }
  }
}
返回参数
| 参数名 | 类型 | 示例值 | 说明 | 
| status | int | 200 | 请求状态(200:请求成功;500:请求错误/失败) | 
| message | string | success | 请求结果的信息,默认为 success | 
| data | object | - | 返回的业务数据 | 
data 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| order | object | - | 订单信息 | 
| personal | object | - | 当前用户信息 | 
| setting | object | - | 商城设置 | 
data.order 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| goodsList | array | - | 商品列表 | 
| orderTotalNum | int | 3 | 订单商品总数量 | 
| couponList | array | - | 用户的优惠券列表 | 
| hasError | boolean | false | 是否存在错误 | 
| errorMsg | string | - | 错误信息 | 
| delivery | int | 10 | 当前配送方式 | 
| address | object | - | 当前收货地址 | 
| existAddress | boolean | true | 是否存在收货地址 | 
| expressPrice | string | 0.00 | 配送费用(运费) | 
| isIntraRegion | boolean | true | 当前用户收货城市是否存在配送规则中 | 
| extractShop | array | - | 自提门店信息 | 
| isAllowPoints | boolean | false | 是否允许使用积分抵扣 | 
| isUsePoints | string | 0 | 是否使用积分抵扣 | 
| pointsMoney | int | 0 | 积分抵扣金额 | 
| pointsBonus | int | 4 | 赠送的积分数量 | 
| lastExtract | object | - | 最近的自提联系方式 | 
| orderTotalPrice | string | 94.49 | 订单商品总额 | 
| couponId | int | 0 | 优惠券ID | 
| couponMoney | int | 0 | 优惠券抵扣金额 | 
| orderPrice | string | 94.49 | 订单金额(含优惠折扣) | 
| orderPayPrice | string | 94.49 | 订单实付款金额(订单金额 + 运费) | 
data.order.goodsList 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| goods_id | int | 10019 | 商品ID | 
| goods_name | string | 清野の木 56L灰色特大号 塑料收纳箱... | 商品标题/名称 | 
| goods_no | string | - | 商品编号 | 
| video_id | int | 0 | 主图视频ID | 
| video_cover_id | int | 0 | 主图视频封面ID | 
| selling_point | string | - | 商品卖点 | 
| spec_type | int | 10 | 商品规格 (10单规格 20多规格) | 
| goods_price_min | string | 31.50 | 商品价格 (最低) | 
| goods_price_max | string | 31.50 | 商品价格 (最高) | 
| line_price_min | string | 0.00 | 划线价格 (最低) | 
| line_price_max | string | 0.00 | 划线价格 (最高) | 
| stock_total | int | 83 | 库存总量 (包含所有sku) | 
| delivery_id | int | 10001 | 配送模板ID | 
| is_points_gift | int | 1 | 是否开启积分赠送 (1开启 0关闭) | 
| is_points_discount | int | 1 | 是否允许使用积分抵扣 (1允许 0不允许) | 
| is_enable_grade | int | 1 | 是否开启会员折扣 (1开启 0关闭) | 
| is_alone_grade | int | 0 | 会员折扣设置 (0默认等级折扣 1单独设置折扣) | 
| alone_grade_equity | array | - | 单独设置折扣的配置 | 
| status | int | 10 | 商品状态 (10上架 20下架) | 
| is_ind_dealer | int | 0 | 是否开启单独分销 (0关闭 1开启) | 
| dealer_money_type | int | 10 | 分销佣金类型 (10百分比 20固定金额) | 
| first_money | string | 0.00 | 分销佣金 (一级) | 
| second_money | string | 0.00 | 分销佣金 (二级) | 
| third_money | string | 0.00 | 分销佣金 (三级) | 
| goods_images | array | - | 商品轮播图 | 
| goods_image | string | 2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg | 商品主图 | 
| goods_sales | int | 203 | 商品显示销量 | 
| is_user_grade | boolean | true | 是否使用会员价 | 
| skuInfo | object | - | 商品SKU信息 | 
| goods_price | string | 32.14 | 商品售价 | 
| total_num | int | 3 | 购买数量 | 
| goods_sku_id | string | 0 | 商品SKU唯一标识 | 
| total_price | string | 94.49 | 商品总价格 | 
| grade_ratio | string | 9.8 | 会员折扣的金额 | 
| grade_goods_price | string | 31.50 | 会员折扣的商品单价 | 
| grade_total_money | string | 1.93 | 会员折扣的总额差 | 
| coupon_money | int | 0 | 优惠券折扣金额 | 
| max_points_num | int | 0 | 最多可抵扣的积分数量 | 
| pointsNum | int | 0 | 实际抵扣的积分数量 | 
| points_money | int | 0 | 积分实际抵扣的金额 | 
| total_pay_price | string | 94.49 | 订单商品的实际付款金额 | 
| expressPrice | int | 0 | 配送费用(运费) | 
| points_bonus | string | 4 | 积分赠送数量 | 
data.order.goodsList.skuInfo 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| id | int | 10525 | SKUID | 
| goods_sku_id | string | 0 | 商品SKU唯一标识 | 
| goods_id | int | 10019 | 商品ID | 
| image_id | int | 0 | SKU图片ID | 
| goods_sku_no | string | - | SKU编码 | 
| goods_price | string | 32.14 | 商品售价 | 
| line_price | string | 0.00 | 划线价 | 
| stock_num | int | 83 | 库存数量 | 
| goods_weight | int | 0 | 商品重量 | 
| goods_props | null | null | SKU规格属性名称 | 
| spec_value_ids | null | null | SKU规格值ID集 | 
data.personal 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| user_id | int | 10125 | 用户ID | 
| balance | string | 91656.64 | 账户余额 | 
| points | int | 64 | 可用积分 | 
| address_id | int | 10052 | 默认收货地址ID | 
data.setting 参数
| 参数名 | 类型 | 示例值 | 说明 | 
| deliveryType | array | [10, 20] | 支持的配送方式(10快递配送 20上门自提) | 
| points_name | string | 积分 | 积分名称 | 
| points_describe | string | - | 积分描述 |