https://api.mch.weixin.qq.com/v3/merchant-service/complaints-v2
请求该地址获取当天的投诉记录正常,其他参数不变传入跨天参数 会导致请求400 bad request
请求正常参数 begin_date : 2021-10-11 end_date:2021-10-11
请求异常参数 begin_date : 2021-10-08 end_date:2021-10-11
其他参数不变,begin_date变动导致400 返回如下
HttpResponseProxy{HTTP/1.1 400 Bad Request [Server: nginx, Date: Mon, 11 Oct 2021 10:32:31 GMT, Content-Type: application/json; charset=utf-8, Content-Length: 98, Connection: keep-alive, Keep-Alive: timeout=8, Cache-Control: no-cache, must-revalidate, X-Content-Type-Options: nosniff, Request-ID: 08BFA5908B0610BD041895C7EEA30620982528A2D201-268446717, Content-Language: zh-CN, Wechatpay-Nonce: 163d3a305b831d848705256ada05bdf8, Wechatpay-Signature: UKqGcV+3/l21Unis1OqRJ16K8yJACERT5njM8LIVul1yATeJ8SwczCVqfYfS5qv17qI1O9kCUc8MMuBk9YeblgE4JSdyoUdWP0/JcYuoPJWjczTius8+DrTdN0Ovwx63hNkYj4yJZNA5+1svC8IJzANY/NVB1ujUKonhpA1DwnmF7f/32/VdNRI9DLb53tZ2iRu90MtRBg5+HlTQ2n6Ck0ZGMJWoj4juw5zh8dksQXI3p2tA5zRFKdpLjTcj2pA8vVTuvGDCvb6KqCxrzUH1RfvesRosiaW+S6AkwUJlmFw+Kn6LB/NS7BkBPQugrcl7tLFX5REAVksrRSid20IbwQ==, Wechatpay-Timestamp: 1633948351, Wechatpay-Serial: 61B187ABD54B848B7D8D2338F8F992C170F3010A] ResponseEntityProxy{[Content-Type: application/json; charset=utf-8,Content-Length: 98,Chunked: false]}}
查询日期跨度不超过30天都可以,400说明是你协议或者参数非法,需要根据接口返回的详细信息排查
400:https://api.mch.weixin.qq.com/v3/merchant-service/complaints-v2?limit=50&offset=0&begin_date=2021-10-10&end_date=2021-10-12&complainted_mchid=160279xxxx
成功: https://api.mch.weixin.qq.com/v3/merchant-service/complaints-v2?limit=50&offset=0&begin_date=2021-10-12&end_date=2021-10-12&complainted_mchid=160279xxxx