# 商户推送自营店铺订单到云订单

商户推送自营店铺订单到云订单

注意:

  1. 云订单自营店铺str_id需要从云订单应用中创建自营门店获取获取;
  2. 接口频率为:以店铺为维度,1次/1分钟,30次/1小时,500次/1天;
  3. 相关的错误码主要有:
    • 1001-请求参数不合法,如超过长度、小于最小值等
    • 1003-请求参数数据类型有误
    • 279001-找不到店铺,请检查str_id
    • 279025-订单同步中
  4. 一次请求最多一百个订单(以子订单为维度)

请求方式:POST

请求地址:https://api.aquanliang.com/gateway/qopen/PushSelfOrder

body参数

{
    "store_str_id": "s_161072e18be84079b44dad932e3a1234",
    "order_list": [
        {
            "order_sn": "qwe",
            "sub_order_sn": "qwer",
            "order_amount": 24,
            "paid_amount": 12,
            "post_fee": 1234,
            "goods_total": 1,
            "state": 2,
            "order_refund_state": 3,
            "order_created_at": 123123,
            "modified_at": 123123,
            "order_pay_at": 123,
            "seller_nick": "卖家昵称",
            "buyer_nick": "买家昵称",
            "spu_id": "123ss",
            "sku_id": "zsa",
            "consignee_name": "qwq",
            "consignee_phone": "12345678901",
            "consignee_province": "广东省",
            "consignee_city": "广州市",
            "consignee_district": "海珠区",
            "consignee_address": "琶洲街道",
            "goods_title": "商品标题",
            "goods_pic_path": "httpxxxxxx"
        }
    ]
}
字段 类型 必填 说明
store_str_id string 云订单自营店铺str_id
order_list array 订单列表,一个请求最多为100个订单
order_list.order_sn string 父订单号
order_list.sub_order_sn string 子订单编号
order_list.order_amount int 零售(原价)金额总计,单位:分
order_list.paid_amount int 实付金额总计,单位:分,不包括邮费
order_list.post_fee int 邮费。单位:分
order_list.goods_total int 商品数量
order_list.state int 订单状态。 1:未付款,2:已付款,3:卖家已发货,4:退款,5:交易完成,6:交易关闭,7:买家已签收
order_list.order_refund_state int 订单退款状态。1:买家已经申请退款,等待卖家同意,2:卖家已经同意退款,等待买家退货,3:买家已经退货,等待卖家确认收货,4:卖家拒绝退款,5:退款关闭,6:退款成功,7:退货中(中间态),8:等待买家同意
order_list.order_created_at int 订单创建时间,秒级时间戳
order_list.modified_at int 订单修改/变更时间,秒级时间戳
order_list.order_pay_at int 订单支付时间,秒级时间戳
order_list.seller_nick string 卖家昵称
order_list.buyer_nick string 买家昵称
order_list.spu_id string 商户自己的spu_id
order_list.sku_id string 商户自己的sku_id
order_list.consignee_name string 收货人的姓名
order_list.consignee_phone string 收货人的电话号码
order_list.consignee_province string 收货人的省份
order_list.consignee_city string 收货人的城市
order_list.consignee_district string 收货人的区域
order_list.consignee_address string 收货人的详细地址
order_list.goods_title string 商品标题
order_list.goods_pic_path string 商品封面图,图片地址

返回值:

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

返回说明

字段 类型 说明
data object 具体业务,目前暂无具体内容返回
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息

完整请求示例:

curl -X POST \
  https://api.aquanliang.com/gateway/qopen/PushSelfOrder \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
          "store_str_id": "s_161072e18be84079b44dad932e3a1234",
          "order_list": [
              {
                  "order_sn": "qwe",
                  "sub_order_sn": "qwer",
                  "order_amount": 24,
                  "paid_amount": 12,
                  "post_fee": 1234,
                  "goods_total": 1,
                  "state": 2,
                  "order_refund_state": 3,
                  "order_created_at": 123123,
                  "modified_at": 123123,
                  "order_pay_at": 123,
                  "seller_nick": "卖家昵称",
                  "buyer_nick": "买家昵称",
                  "spu_id": "123ss",
                  "sku_id": "zsa",
                  "consignee_name": "qwq",
                  "consignee_phone": "12345678901",
                  "consignee_province": "广东省",
                  "consignee_city": "广州市",
                  "consignee_district": "海珠区",
                  "consignee_address": "琶洲街道",
                  "goods_title": "商品标题",
                  "goods_pic_path": "httpxxxxxx"
              }
          ]
      }'