# 商户推送自营店铺订单到云订单
商户推送自营店铺订单到云订单
推送频率限制
每分钟/次 | 每小时/次 | 每天/次 |
---|---|---|
6 | 180 | 3000 |
注:以店铺为维度
注意:
- 云订单自营店铺str_id需要从云订单应用中创建自营门店获取获取;
- 相关的错误码主要有:
- 1001-请求参数不合法,如超过长度、小于最小值等
- 1003-请求参数数据类型有误
- 279001-找不到店铺,请检查str_id
- 279025-订单同步中
- 279126-店铺类型错误
- 一次请求最多一百个订单(以子订单为维度)
请求方式:POST
请求地址:https://$basehost/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": 1653012777,
"modified_at": 1653012557,
"order_pay_at": 1653012666,
"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",
"union_id":"xxxx"
}
],
"store_type": "1"
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
store_str_id | string | 是 | 云订单自营店铺/线下门店str_id |
store_type | uint32 | 否 | 云订单店铺店铺类型,默认:自营店铺,1:线下门店 |
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 | 否 | 商品封面图,图片地址 |
order_list.union_id | string | 否 | 微信union_id |
order_list.buyer_open_id | string | 否 | 买家在客户系统内自定义的ID |
返回值:
{
"data": {},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
data | object | 具体业务,目前暂无具体内容返回 |
errcode | int | 状态码,0为正常,非0代表错误 |
errmsg | string | 错误信息 |
hint | string | 请求日志ID |
完整请求示例:
curl -X POST \
https://$basehost/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": 1653012777,
"modified_at": 1653012557,
"order_pay_at": 1653012666,
"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"
}
]
}'