新增订单事件
消息与事件接收URL
发送 POST
请求开发指南
-准备
-回调事件接入指南
进行接入请求参数名 | 类型 | 说明 |
---|---|---|
data | Object | 消息体 |
data.id | String | 事件id |
data.event | String | 事件主类型(固定:MALL_ORDER) |
data.action | String | 事件子类型(固定:MALL_ORDER_CREATE) |
data.body | Object | 数据内容 |
data.body.new | Object | 订单信息 |
data.body.new.id | String | 订单id |
data.body.new.orderNumber | String | 订单编号 |
data.body.new.agentId | String | 代理商ID |
data.body.new.createTime | String | 订单创建时间 |
data.body.new.updateTime | String | 订单更新时间 |
data.body.new.status | Int | 订单状态 10=待支付;20=待发货;30=待成团;40=待收货;50=已完成;70=已取消;100=已关闭;101=待自提; |
data.body.new.source | Int | 订单创建来源 1=小程序; 2=H5;3=视频号; |
data.body.new.orderType | Int | 订单商品类型 1=实物商品;2=虚拟商品;3=优惠券商品; |
data.body.new.realType | Int | 真实订单类型 1=自主下单;2=代客下单;3=erp同步订单;4=openAPI订单;5=手动导入订单; |
data.body.new.submitType | Int | 订单业务类型 1=自主下单;2=代客下单;3=erp同步订单;4=openAPI订单;5=手动导入订单; |
data.body.new.goodsTotalPrice | Int | 商品总价 |
data.body.new.paymentTotalPrice | Int | 实付总价 |
data.body.new.preferentialPrice | Int | 优惠总价 管理员改价后的优惠 |
data.body.new.payNumber | String | 支付流水号 |
data.body.new.expressFeePrice | Int | 运费 |
data.body.new.remark | String | 买家备注 |
data.body.new.businessesRemark | String | 卖家备注 |
data.body.new.orderItems | Object[] | 订单商品信息 |
data.body.new.orderItems.price | Int | 单价*数量 的sku价格 |
data.body.new.orderItems.priceAfter | String | 小数点2位之后的价格 |
data.body.new.orderItems.paymentPrice | Int | 单价*数量的sku实付价 |
data.body.new.orderItems.paymentPriceAfter | String | 实付价 2位小数之后 |
data.body.new.orderItems.num | Int | 商品数量 |
data.body.new.orderItems.discountRate | Int | 折扣比例 |
data.body.new.orderItems.couponTotalAmount | Int | 优惠券金额 |
data.body.new.orderItems.comment | String | 备注信息 |
data.body.new.orderItems.orderGoods | Object | 商品详情 |
data.body.new.orderItems.orderGoods.skuId | String | skuID |
data.body.new.orderItems.orderGoods.goodsId | String | 商品Id |
data.body.new.orderItems.orderGoods.goodsCode | String | 商品编码 |
data.body.new.orderItems.orderGoods.goodsName | String | 商品名称 |
data.body.new.orderItems.orderGoods.skuName | String | sku名称 |
data.body.new.orderItems.orderGoods.cover | String | 封面缩略图 |
data.body.new.orderItems.orderGoods.unitPrice | String | 单价 |
data.body.new.orderItems.orderGoods.code | String | SKU code |
data.body.new.orderItems.orderGoods.goodsType | Int | 商品类型 0=默认;1=普通商品;2=虚拟商品;3=优惠券商品; |
data.body.new.orderItems.orderGoods.units | String | 商品单位 |
data.body.new.orderItems.orderGoods.activity | Object | 活动信息 |
data.body.new.orderItems.orderGoods.activity.activityId | String | 活动ID |
data.body.new.orderItems.orderGoods.activity.type | Int | 活动类型 类型 1=普通,未参加活动;2=拼团;3=周期购; |
data.body.new.orderItems.orderGoods.isDtbGoods | Bool | 是否为分销商品 |
data.body.new.orderItems.orderGoods.cost | Int | 成本价 |
data.body.new.orderItems.orderGoods.categoryId | String | 商品分类ID |
data.body.new.orderItems.orderGoods.categoryName | String | 商品分类名称 |
data.body.new.orderExt | Object | 订单拓展字段 |
data.body.new.orderExt.sourceShopName | String | 来源店铺名称 |
data.body.new.orderExt.customFields | Object[] | 订单自定义字段 |
data.body.new.orderExt.customFields.id | String | 自定义字段ID |
data.body.new.orderExt.customFields.kind | String | 自定义字段类型 date、dateTime、checkbox、single、multi、radio、select、number; |
data.body.new.orderExt.customFields.strVal | String | 存放字符串类型值 date、 dateTime、single、multi、radio、select; |
data.body.new.orderExt.customFields.intVal | Int | 存放数字类型的值 number |
data.body.new.orderExt.customFields.arrVal | String[] | 存放数组类型的值 checkbox |
data.body.new.orderExt.address | Object | 收货地址信息 |
data.body.new.orderExt.address.consignee | String | 收货人 |
data.body.new.orderExt.address.mobile | String | 收货电话 |
data.body.new.orderExt.address.postCode | String | 邮编 |
data.body.new.orderExt.address.province | String | 省份 code |
data.body.new.orderExt.address.city | String | 城市 code |
data.body.new.orderExt.address.area | String | 地区 code |
data.body.new.orderExt.address.provinceName | String | 省名称 |
data.body.new.orderExt.address.cityName | String | 市名称 |
data.body.new.orderExt.address.areaName | String | 地区名称 |
data.body.new.orderExt.address.address | String | 详细地址 |
data.body.new.orderExt.confirmReceiptTimeOut | Int | 确认收货超时时间 |
data.body.new.orderExt.applyAfterSaleTimeout | Int | 售后超时时间 |
data.body.new.orderExt.buyPhone | String | 购买人手机号码 |
data.body.new.orderExt.depInfo | Object[] | 员工所在部门信息 |
data.body.new.orderExt.depInfo.id | Int | 部门ID |
data.body.new.orderExt.depInfo.name | String | 部门名称,包含部门链路信息 |
data.body.new.orderExt.followUserId | String | 订单归属员工ID |
data.body.new.orderExt.followUserName | String | 订单归属员工姓名 |
data.body.new.orderExt.creator | String | 订单创建人ID,员工创建时=员工ID;客户创建时(自主下单)=客户ID |
data.body.new.orderExt.creatorName | String | 创建人姓名,自主下单=微信用户授权名称 |
data.body.new.orderExt.customerFollower | String | 根据订单当前关联联系人/企业,推送对应的跟进人ID |
data.body.new.orderExt.customerFollowerName | String | 根据订单当前关联联系人/企业,推送对应的跟进人姓名 |
data.body.extra | Object | 订单附加信息 |
data.body.extra.member | Object | 附加内容 |
data.body.extra.member.companyId | String | 尘锋系统级ID,如有多个企业接入尘锋,则可通过本字段区分企业 |
data.body.extra.member.unionId | String | 微信用户在微信生态的唯一标识 |
data.body.extra.member.phone | String | 手机号码 |
data.body.extra.member.createTime | String | 创建时间 |
data.body.extra.member.name | String | 名称 |
data.body.extra.member.corpId | String | 企业ID |
data.body.extra.member.customerId | String | 联系人ID |
data.body.extra.member.avatar | String | 用户头像 |
data.body.scene | String | 事件触发场景 system=系统触发; |
json
- Request-Example://信息明文推送
{
"id": "62f27869-5191-4c0d-b7ee-92bac633e328",
"event": "MALL_ORDER",
"action": "MALL_ORDER_CREATE",
"body": {
"new": {
"id": "8d151838-bf78-4fa5-a5b8-56b1da433a14",
"agentId": "0",
"createTime": "2023-05-23 10:46:49",
"updateTime": "2023-05-23 10:46:49",
"orderNumber": "1660839673306902528",
"status": 25,
"source": 0,
"orderType": 1,
"realType": 2,
"submitType": 2,
"goodsTotalPrice": 990000,
"paymentTotalPrice": 220000,
"preferentialPrice": 770000,
"payNumber": "",
"expressFeePrice": 0,
"remark": "",
"businessesRemark": "",
"orderItems": [{
"price": 990000,
"priceAfter": "0",
"paymentPrice": 220000,
"paymentPriceAfter": "0",
"num": 1,
"discountRate": 100,
"couponTotalAmount": 0,
"comment": "",
"orderGoods": {
"skuId": "18e8a7d4-bbdc-4f15-9953-d1344857ad02",
"goodsId": "8aea7aa2-25dc-48fe-8260-b7c0976e5a5c",
"goodsCode": "",
"goodsName": "HR数据002",
"skuName": "",
"cover": "",
"unitPrice": "99",
"code": "",
"goodsType": 1,
"units": "件",
"isDtbGoods": false,
"cost": 0,
"categoryId": "299ae078-d5ea-440e-824f-6f971d280352",
"categoryName": "导入1/导入2",
"activity": {
"activityId": "",
"type": 1
}
}
}],
"orderExt": {
"sourceShopName": "",
"confirmReceiptTimeOut": 0,
"applyAfterSaleTimeout": 0,
"buyPhone": "",
"followUserId": "2850",
"followUserName": "韩冉",
"creator": "2850",
"creatorName": "韩冉",
"customerFollower": "2850",
"customerFollowerName": "韩冉",
"customFields": [{
"id": "field2",
"kind": "date",
"strVal": "2023-05-23",
"intVal": 0,
"arrVal": []
}, {
"id": "7458a05c-a34d-11eb-8800-e611be48e2a3",
"kind": "date",
"strVal": "2022-12-21",
"intVal": 0,
"arrVal": []
}],
"address": {
"consignee": "123",
"mobile": "16476923432",
"postCode": "510000",
"province": "140000",
"city": "140300",
"area": "140311",
"provinceName": "山西省",
"cityName": "阳泉市",
"areaName": "郊区",
"address": "222"
},
"depInfo": [{
"id": 2,
"name": "北京尘锋信息技术有限公司成都分公司/测试111"
}]
}
},
"extra": {
"member": {
"companyId": "",
"unionId": "",
"phone": "",
"createTime": "",
"name": "",
"customerId": "",
"avatar": "",
"corpId": "ec18b70b-4aa2-11ed-87a4-66bc57c0daaf"
}
},
"scene": "system"
}
}
//信息加密推送
{
"id": "350670664413253632",
"event": "MALL_ORDER",
"action": "MALL_ORDER_CREATE",
"body": {
"encrypt": "XOKphmyMEcuW94gYtL/5Nj4ueFcfjaEFecC507QGzXbnDmavLp7I+s7K5BI4Qjt+Ayy/mNbw9bUE2x0HkSWm9h57VKJc9VLBghTjALWJcJduBDC7L6doORsZdaNlfVJU6DJ0VLyd1NojW9PfrzS01eQ7GW/dgaO3tkXQP2AOrGTn3Ca8haZQiwEJDYN/NUjW1/9T+gIcBu8LbmZGyokwrOD+ZGy7uky37yq8w8SGpis1WR2pIlZUOo+QdmWnMY1kJ9bHelH9h3ERemmNRIh/oMZp7QvFaNl/iCgUVAkh14tOV0nniE9Ld29GxyIEFz0nxD5+s4AG4cvq+xl+FXhu0A==",
"msgSignature": "d64cc4a02b22b725a6b50a9843ebf9c0fd7ca70f",
"timeStamp": "1661233174",
"nonce": "9ZvYhI4aFmR7wUNl"
}
}
修改于 2024-09-20 10:55:19