订单下单

提交订单

  1. 创建订单表项和订单商品表项;
  2. 购物车清空;
  3. 优惠券设置已用;
  4. 商品货品库存减少;
  5. 如果是团购商品,则创建团购活动表项。

请求地址

POST https://{host}/openapi/order/submit

请求参数

属性 类型 默认值 必填 说明
x-token String 用户token

body

属性 类型 默认值 必填 说明
cartId int 购物车id
addressId int 地址id
couponId int 优惠券id
message int 留言
grouponRulesId int 拼团规则id
grouponLinkId int 拼团关联团id

返回值

{
  "errcode": "0",
  "errmsg": "",
  "data": {
    "orderId": 14
  }
}

参数说明

属性 类型 说明
data DATA 包含返回的数据
errcode number 错误码
errmsg string 错误信息

DATA

属性 类型 说明
orderId int 订单id

errcode 的合法值

说明 最低版本
-1 系统错误
0 请求成功
11001 团购活动已过期
20001 参数为空
20003 参数错误
61002 订单不存在
61006 当前商品不能评价
61007 订单商品已评价
61008 当前商品评价时间已经过期
22002 更新操作失败

results matching ""

    No results matching ""