💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 创建订单 >[danger]接口认证:**需要认证** ##### 响应说明 | 字段名 | 字段类型 | 字段说明 | | --- | --- | --- | | order_id | int | 订单id | ## 示例 ~~~[api] post:/order/create *int:address_id=14#用户选择的收货地址id *string:sku_info=[{"goods_sku_ref_id":"19","num":"2"},{"goods_sku_ref_id":"34","num":"3"}]#下单的商品规格数量json串 is_group_by=0#是不是团购订单,0为普通1为团购,会影响商品价格,默认0 group_by_id=0#拼团id,0或不传为开团,传id为拼团 string:order_note#订单备注 <<< success { "code": 200, "msg": "成功", "data": { "order_id": 22 } } ~~~ ## 可能出现的错误码 > 不包含常见的请求方式错误,参数丢失,用户权限验证失败 ~~~ const USER_ADDRESS_NOT_FOUND = [ 'code' => 101004, 'msg' => '用户地址不存在' ]; ~~~ ~~~ const GOODS_NOT_FOUND = [ 'code' => 111001, 'msg' => '商品不存在' ]; ~~~ ~~~ const GOODS_NOT_PUBLISHED = [ 'code' => 111003, 'msg' => '商品已下架' ]; ~~~ ~~~ const GOODS_STOCK_NUMBER_NOT_ENOUGH = [ 'code' => 111004, 'msg' => '商品库存不足' ]; ~~~ ~~~ const USER_WHOLESALE_SCORE_NOT_ENOUGH = [ 'code' => 101005, 'msg' => '批发配额积分不足' ]; ~~~ ~~~ const USER_SPECIAL_SCORE_NOT_ENOUGH = [ 'code' => 101006, 'msg' => '养老积分不足' ]; ~~~ ~~~ // 非新人购买幸运抢批中的新人专场 const USER_NOT_WHOLESALE_NEW_USER = [ 'code' => 101007, 'msg' => '你已购买过抢批商品' ]; ~~~ ~~~ const ORDER_LIMIT_EXCEED = [ 'code' => 121001, 'msg' => '商品超过限购' ]; ~~~ ~~~ const CREATE_ORDER_FAILED = [ 'code' => 121002, 'msg' => '创建订单失败' ]; ~~~ ~~~ const CREATE_ORDER_GOODS_FAILED = [ 'code' => 121003, 'msg' => '创建订单商品失败' ]; ~~~ ~~~ const ORDER_NOT_YOURS = [ 'code' => 121004, 'msg' => '订单不属于你' ]; ~~~