搜索订单

接口调用请求说明

  1. http请求方式:POST
  2. https://api.weixin.qq.com/product/order/search?access_token=xxxxxxxxx

请求参数示例

  1. {
  2. "start_pay_time": "2020-03-25 12:05:25",
  3. "end_pay_time": "2020-04-25 12:05:25",
  4. "title": "标题关键字",
  5. "sku_code": "12321",
  6. "user_name": "张三",
  7. "tel_number": "13700000000",
  8. "on_aftersale_order_exist": 0,
  9. "status": 20,
  10. "source": 1, //订单来源,默认0, 0:全部, 1:小商店自营订单, 2:带货订单
  11. "order_id": 123, // 选填,只搜一个订单时使用
  12. "page": 1,
  13. "page_size": 10
  14. }

回包示例

  1. {
  2. "errcode": 0,
  3. "errmsg":"ok",
  4. "orders":
  5. [
  6. {
  7. "order_id":32434234,
  8. "status": 23,
  9. "craete_time": "2020-03-25 13:05:25",
  10. "update_time": "2020-03-25 14:05:25",
  11. "order_detail":
  12. {
  13. "product_infos":
  14. [
  15. {
  16. "product_id": 234245,
  17. "sku_id":23424,
  18. "sku_cnt": 10,
  19. "on_aftersale_sku_cnt": 10,
  20. "finish_aftersale_sku_cnt": 0,
  21. "title":"健身环",
  22. "thumb_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg",
  23. "sku_attrs":
  24. [
  25. {
  26. "attr_key": "选择颜色",
  27. "attr_value": "红蓝主机"
  28. }
  29. ],
  30. "slae_price": 2000
  31. },
  32. ...
  33. ]
  34. "pay_info":
  35. {
  36. "pay_method": "微信支付",
  37. "prepay_id": "42526234625",
  38. "transaction_id": "131456479687",
  39. "prepay_time": "2020-03-25 14:04:25"
  40. "pay_time": "2020-03-25 14:05:25"
  41. },
  42. "price_info":
  43. {
  44. "product_price": 20000,
  45. "order_price": 10500,
  46. "freight": 500,
  47. "discounted_price": 10000
  48. "is_discounted": 1
  49. }
  50. "delivery_info":
  51. {
  52. "delivery_method": "快递",
  53. "delivery_time": "2020-03-25 16:05:25",
  54. "delivery_product_info":
  55. [
  56. {
  57. "waybill_id": "134654612313",
  58. "delivery_id": "STO"
  59. }
  60. ]
  61. "address_info":
  62. {
  63. "user_name":"陈先生",
  64. "postal_code": "2435245",
  65. "province_name": "广东",
  66. "city_name": "广州",
  67. "county_name": "海珠区",
  68. "detail_info": "大塘",
  69. "national_code": "234234",
  70. "tel_number": "24534252"
  71. }
  72. }
  73. },
  74. "after_sale_info":
  75. {
  76. "aftersale_order_list": [
  77. {
  78. "aftersale_order_id": 1234
  79. }
  80. ],
  81. "on_aftersale_order_cnt": 1
  82. },
  83. "openid": "xxxxx",
  84. "ext_info":
  85. {
  86. "customer_notes": "发顺丰",
  87. "merchant_notes": "库存不足,取消"
  88. }
  89. },
  90. ...
  91. ],
  92. "total_num": 20
  93. }

请求参数说明

参数类型是否必填说明
start_pay_timestring订单支付时间的搜索开始时间
end_pay_timestring订单支付时间的搜索结束时间
titlestring商品标题关键词
sku_codestring商品编码
user_namestring收件人
tel_numberstring收件人电话
on_aftersale_order_existnumber不填该参数:全部订单 0:没有正在售后的订单, 1:正在售后单数量大于等于1的订单
statusnumber订单状态
sourcenumber订单来源,默认0, 1:小商店自营订单, 2:带货订单
order_idnumber选填,只搜一个订单时使用
pagenumber第几页(最小填1)
page_sizenumber每页数量(不超过10,000)

回包参数说明

参数类型说明
errcodestring错误码
errmsgstring错误信息
orders[].order_idnumber订单ID
orders[].create_timestring创建时间
orders[].update_timestring更新时间
orders[].order_detail.product_infos[].product_idnumber小商店内部商品ID
orders[].order_detail.product_infos[].sku_idnumber小商店内部skuID
orders[].order_detail.product_infos[].thumb_imgstringsku小图
orders[].order_detail.product_infos[].sku_cntnumbersku数量
orders[].order_detail.product_infos[].on_aftersale_sku_cntnumber正在售后/退款流程中的sku数量
orders[].order_detail.product_infos[].finish_aftersale_sku_cntnumber完成售后/退款的sku数量
orders[].order_detail.product_infos[].sale_pricenumber售卖价格,以分为单位
orders[].order_detail.product_infos[].sku_attrs[].attr_keystring属性键key(属性自定义用)
orders[].order_detail.product_infos[].sku_attrs[].attr_valuestring属性值(属性自定义用)
orders[].order_detail.pay_info.pay_methodstring支付方式(目前只有”微信支付”)
orders[].order_detail.pay_info.prepay_idstring预支付ID
orders[].order_detail.pay_info.transaction_idstring支付订单号
orders[].order_detail.pay_info.prepay_timestring预付款时间
orders[].order_detail.pay_info.pay_timestring付款时间
orders[].order_detail.price_info.product_pricenumber商品金额(单位:分)
orders[].order_detail.price_info.order_pricenumber订单金额(单位:分)
orders[].order_detail.price_info.freightnumber运费(单位:分)
orders[].order_detail.price_info.discounted_pricenumber优惠金额(单位:分)
orders[].order_detail.price_info.is_discountednumber是否有优惠(0:无优惠/1:有优惠)
orders[].order_detail.delivery_info.delivery_methodstring快递方式(目前只有”快递”)
orders[].order_detail.delivery_info.delivery_timestring发货时间
orders[].order_detail.delivery_info.delivery_product_info[].waybill_idstring快递单号
orders[].order_detail.delivery_info.delivery_product_info[].delivery_idstring快递公司编号
orders[].order_detail.delivery_info.address_info.usernamestring收货人姓名
orders[].order_detail.delivery_info.address_info.postal_codestring邮编
orders[].order_detail.delivery_info.address_info.province_namestring国标收货地址第一级地址
orders[].order_detail.delivery_info.address_info.city_namestring国标收货地址第二级地址
orders[].order_detail.delivery_info.address_info.county_namestring国标收货地址第三级地址
orders[].order_detail.delivery_info.address_info.detail_infostring详细收货地址信息
orders[].order_detail.delivery_info.address_info.national_codestring收货地址国家码
orders[].order_detail.delivery_info.address_info.tel_numberstring收货人手机号码
orders[].aftersale_detail.aftersale_order_list[].aftersale_order_idnumber售后单ID(售后接口开放后可用于查询)
orders[].aftersale_detail.on_aftersale_order_cntnumber正在售后流程的售后单数
orders[].openidstring用户的openid,用于物流助手接口
orders[].ext_info.customer_notesstring用户备注
orders[].ext_info.merchant_notesstring商家备注
total_numnumber订单总数

枚举-status

枚举值描述
10待付款
20待发货
30待收货
100完成
200全部商品售后之后,订单取消
250用户主动取消或待付款超时取消

返回码

返回码错误类型
-1系统异常
-2token太长
9401020参数有误