查询订单接口
查询推广的订单明细及佣金信息,包括到店、到家、买菜等业务类型的订单。支持按付款时间或更新时间查询近 3 个月的订单明细。需用 POST 方式调用。只接受 JSON 格式。
请求方式 POST Content-Type application/json
API 地址 https://media.meituan.com/cps_open/common/api/v1/query_order

请求参数(入参)

公共签名请求头(Header)

参数名称类型是否必填描述
S-Ca-App String 必填 分配的 AppKey
S-Ca-Signature String 必填 签名字符串
S-Ca-Timestamp String 必填 API 调用者传递时间戳,值为当前时间的毫秒数,时间戳有效时间为 2 分钟
Content-MD5 String 必填 Body MD5,有请求体接口必传
S-Ca-Signature-Headers String 必填 将需要签名的 header 使用英文逗号分割放到 Request Header 中,其中必须包括 S-Ca-Timestamp,建议将 S-Ca-App 也添加进去,例如 S-Ca-Timestamp,S-Ca-App

接口请求 Body(JSON 结构)

参数名称类型是否必填描述
platform Integer 非必填 商品所属业务一级分类类型:1 到家及其他业务类型,2 到店业务类型(包含到店美食、休闲生活、酒店、门票);不填则默认 1
businessLine List<Integer> 非必填 业务线标识。
当 platform=1(到家)时:1·外卖2·闪购红包3·酒旅4·美团电商5·医药6·拼好饭7·商品超值券包8·买菜9·美团私域11·闪购商品12·省钱包 不传默认全部(非券包/省钱包)
当 platform=2(到店)时:1·到餐2·到综3·酒店4·门票5·民宿6·度假15·到店红包1301·火车票1302·飞机票 默认1
999·新客CPA(到家+到店)
categoryIds List<Long> 非必填 订单品类。platform=1,businessLine=11时:12·连锁商超 14·小商超 21·线上便利店 128·日百服饰 106·数码家电 107·美妆日化 108·母婴玩具 110·宠物 24·生鲜 16·鲜花 15·水果 26·酒饮 25·休闲食品 137·旗舰店 -2·其他;platform=1,businessLine=9时:1·进群 2·下单 3·首关注;platform=2,businessLine=3时:209·酒店 2327·非标住宿;platform=2,businessLine=2时:3·休闲娱乐 338·结婚 289·教育 390·养车 206·运动 600·家居 379·购物 389·亲子 450·医疗 4·生活服务 1853·K歌 1861·宠物 -1·其他;businessLine=999时:1001·到餐纯新 1002·到餐召回 1003·到综纯新 1004·到综召回 1005·闪购纯新 1006·闪购召回 1007·外卖纯新 1008·外卖沉默 1009·外卖预警 1010·外卖流失
actId Long 非必填 活动物料 ID,不传则返回所有 actId 的数据,省钱包订单不传
sid String 非必填 二级推广位 ID,最长 64 位,不传则返回所有 sid 的数据
orderId String 非必填 订单 ID,入参后可与 businessLine 配合使用。如查询商品超值券包订单时 orderId 传券包订单号,businessLine 传 7;其他查询筛选条件不生效
startTime Integer 非必填 查询时间类型对应的查询开始时间,10 位时间戳,单位:秒
endTime Integer 非必填 查询时间类型对应的查询结束时间,10 位时间戳,单位:秒
page Integer 非必填 页码,默认 1,从 1 开始。若 searchType 选择 2,本字段必须传 1
limit Integer 非必填 每页限制条数,默认 100,最大支持 100
queryTimeType Integer 非必填 查询时间类型
1 · 按订单支付时间查询2 · 按照更新时间查询
默认为 1
tradeType Integer 非必填 交易类型
1 · CPS2 · CPA
scrollId String 非必填 分页 ID,当 searchType 选择 2(逐页查询)时,本字段为必填。取值为上一页出参的 scrollId 字段
searchType Integer 非必填 订单分页查询方案
1 · 分页查询(最多 1 万条)2 · 逐页查询(不限数量)
默认 1。省钱包查询仅支持 2
⚠️ searchType=1 后续不再维护,建议使用 2(逐页查询),需配合 scrollId 参数
cityNames List<String> 非必填 城市名称,单次最多 10 个城市(英文逗号分隔)。不传则默认全部城市。支持到家-商品超值券包;到店-到餐/到综/酒店/门票/民宿/度假

返回参数(出参)

参数名称类型是否必填描述
code int 必填 响应码
0 · 成功   非0 · 失败
message String 必填 响应文案
data 非必填 响应结果信息
actId Long 非必填 活动物料 ID
skuCount Integer 必填 查询返回本页的数量合计
scrollId String 必填 分页 ID,当 searchType=2 时返回,用于下一页查询入参
dataList 非必填 数据列表
businessLine Integer 必填 业务线,同入参枚举说明
orderId String 必填 订单 ID
payTime Integer 必填 订单支付时间
payPrice String 非必填 订单支付价格(元)。到餐、到综、酒店、闪购、医药为父订单支付价格
updateTime Integer 必填 订单最近一次更新时间。到家外卖商品券、到家医药、到家闪购、到店到餐、到综、酒店类型为券包购买时间
commissionRate String 必填 订单预估佣金比例,300 表示 3%
profit String 必填 CPS 类型的预估佣金收入(元),1.60 表示 1.6 元
cpaProfit String 必填 CPA 类型的预估佣金收入(元),6.50 表示 6.5 元
sid String 非必填 二级媒体身份标识,用于渠道效果追踪
productId String 非必填 产品 ID,对应商品查询接口的 skuViewId
productViewSign String 非必填 商品 ID,对应商品查询接口的 productViewSign
productName String 非必填 产品名称。外卖实物订单展示前 5 个商品(超出不展示),外卖商品券和到店订单展示商品名称
specificationName String 非必填 规格信息,同一商品名称下不同规格对应不同价格和佣金
orderDetail 非必填 订单详情,仅到家外卖商品券、到家医药、到家闪购、到店到餐、到综、酒店类型返回
couponStatus String 非必填 商品券/子订单推广计佣状态
1 · 付款2 · 完成(或券已核销)3 · 结算4 · 失效(含取消或风控)
itemOrderId String 非必填 到店到餐/到综/酒店商品券的子订单号
finishTime String 非必填 到家外卖商品券:券核销完成履约时间;到家医药&闪购:订单完成时间;到店到餐/到综/酒店:券核销时间
basicAmount String 非必填 商品的计佣金额(元),每个商品对应的支付分摊金额
couponFee String 非必填 商品的佣金(元),推广状态为失效/取消/风控时佣金值为 0
orderViewId String 非必填 仅到家外卖商品券有效。券核销完成履约的实物菜品订单号
refundAmount String 非必填 退款金额(元),到店到餐/到综/酒店子订单、到家闪购/医药有效
refundFee String 非必填 退款佣金(元),到店到餐/到综/酒店子订单、到家闪购/医药有效
refundTime String 非必填 退款时间,到店到餐/到综/酒店子订单、到家闪购/医药有效
settleTime String 非必填 结算时间,完成并进入结算账期时变为结算状态。多次结算取最新时间
updateTime String 非必填 子订单的更新时间
incentiveOrder Boolean 非必填 是否为激励订单,true 表示参与了激励活动
incentiveIds List 非必填 激励活动 ID 列表
refundPrice String 非必填 订单维度退款价格(元),非到店到餐/到综/酒店类型有效。超值券包订单本期不返回
refundTime String 非必填 订单维度最新退款时间,非到店到餐/到综/酒店类型有效
refundProfit String 非必填 订单维度退款预估佣金(元),非到店到餐/到综/酒店类型有效
cpaRefundProfit String 非必填 CPA 退款预估佣金(元)
status String 非必填 订单维度状态(含多个商品/券包时建议以 orderDetail 中每张券状态为准)
2·付款3·完成4·取消5·风控6·结算
tradeType Integer 非必填 交易类型:1-CPS,2-CPA
actId Long 非必填 活动物料 ID
appkey String 非必填 归因到的 appKey,对应取链时入参的 appkey
skuCount Integer 非必填 SKU 数量(团好货和券包类型的 CPS 订单返回,其余不返回)
cityName String 非必填 订单所属城市,支持三级城市粒度
categoryId Long 非必填 订单品类 ID
categoryName String 非必填 订单品类名称
incentiveOrder Boolean 非必填 是否为激励订单,true 表示参与了激励活动
incentiveIds List 非必填 激励活动 ID 列表

请求示例

{
  "limit": 20,
  "queryTimeType": 1,
  "page": 1
}

返回示例

成功响应

{
  "code": 0,
  "message": "成功",
  "data": {
    "actId": null,
    "skuCount": 6,
    "scrollId": "cebbef8776874b248a182d966b42532c",
    "dataList": [{
      "businessLine": 1,
      "orderId": "800611112553920000",
      "payTime": 1688875000,
      "payPrice": "100.00",
      "updateTime": 1688956422,
      "commissionRate": "300",
      "profit": "3.00",
      "cpaProfit": "0",
      "sid": null,
      "productId": "null",
      "productName": "江渔子捞汁小海鲜(XXX店)",
      "orderDetail": null,
      "refundPrice": null,
      "refundTime": "null",
      "refundProfit": "null",
      "cpaRefundProfit": "0",
      "status": "6",
      "tradeType": 1,
      "appkey": "xxxxxxxx",
      "skuCount": 1
    }, {
      "businessLine": 1,
      "orderId": "800611111003350000",
      "payTime": 1688734000,
      "payPrice": "50.00",
      "updateTime": 1688783416,
      "commissionRate": "300",
      "profit": "1.50",
      "cpaProfit": "0",
      "sid": null,
      "productId": "null",
      "productName": "刘记盘锦小卷饼(XXX店)",
      "orderDetail": null,
      "refundPrice": null,
      "refundTime": "null",
      "refundProfit": "null",
      "cpaRefundProfit": "0",
      "status": "6",
      "tradeType": 1,
      "appkey": "xxxxxxxx",
      "skuCount": 1
    }]
  }
}

异常响应

{
  "code": "400",
  "msg": "未授权"
}