查询投诉单协商历史
更新时间:2025.08.28商户可通过调用此接口,查询指定投诉单的用户与商户的协商历史,以分页输出查询结果,方便商户根据处理历史来制定后续处理方案。
接口说明
支持商户:【普通服务商】 【从业机构(银行)】 【从业机构(支付机构)】 【渠道商】 【清算机构】
请求方式:【GET】/v3/merchant-service/complaints-v2/{complaint_id}/negotiation-historys
请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点
【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看
请求参数
Header HTTP头参数
Authorization 必填 string
请参考签名认证生成认证信息
Accept 必填 string
请设置为application/json
path 路径参数
complaint_id 必填 string(64)
【投诉单号】 投诉单对应的投诉单号
query 查询参数
limit 选填 integer
【分页大小】 设置该次请求返回的最大协商历史条数,范围[1,300]
offset 选填 integer
【分页开始位置】 该次请求的分页开始位置,从0开始计数,例如offset=10,表示从第11条记录开始返回。
请求示例
GET
1curl -X GET \ 2 https://api.mch.weixin.qq.com/v3/merchant-service/complaints-v2/200201820200101080076610000/negotiation-historys?limit=50&offset=10 \ 3 -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"1900000001\",..." \ 4 -H "Accept: application/json" 5
需配合微信支付工具库 WXPayUtility 使用,请参考Java
1package com.java.demo; 2 3import com.java.utils.WXPayUtility; // 引用微信支付工具库,参考:https://pay.weixin.qq.com/doc/v3/partner/4014985777 4 5import com.google.gson.annotations.SerializedName; 6import com.google.gson.annotations.Expose; 7import okhttp3.MediaType; 8import okhttp3.OkHttpClient; 9import okhttp3.Request; 10import okhttp3.RequestBody; 11import okhttp3.Response; 12 13import java.io.IOException; 14import java.io.UncheckedIOException; 15import java.security.PrivateKey; 16import java.security.PublicKey; 17import java.util.ArrayList; 18import java.util.HashMap; 19import java.util.List; 20import java.util.Map; 21 22/** 23 * 查询投诉单协商历史 24 */ 25public class QueryNegotiationHistoryV2 { 26 private static String HOST = "https://api.mch.weixin.qq.com"; 27 private static String METHOD = "GET"; 28 private static String PATH = "/v3/merchant-service/complaints-v2/{complaint_id}/negotiation-historys"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/partner/4013080340 32 QueryNegotiationHistoryV2 client = new QueryNegotiationHistoryV2( 33 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340 34 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924 35 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 36 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589 37 "/path/to/wxp_pub.pem" // 微信支付公钥文件路径,本地文件路径 38 ); 39 40 QueryNegotiationHistoryV2Request request = new QueryNegotiationHistoryV2Request(); 41 request.complaintId = "200201820200101080076610000"; 42 request.limit = 50L; 43 request.offset = 10L; 44 try { 45 QueryNegotiationHistoryV2Response response = client.run(request); 46 // TODO: 请求成功,继续业务逻辑 47 System.out.println(response); 48 } catch (WXPayUtility.ApiException e) { 49 // TODO: 请求失败,根据状态码执行不同的逻辑 50 e.printStackTrace(); 51 } 52 } 53 54 public QueryNegotiationHistoryV2Response run(QueryNegotiationHistoryV2Request request) { 55 String uri = PATH; 56 uri = uri.replace("{complaint_id}", WXPayUtility.urlEncode(request.complaintId)); 57 Map<String, Object> args = new HashMap<>(); 58 args.put("limit", request.limit); 59 args.put("offset", request.offset); 60 String queryString = WXPayUtility.urlEncode(args); 61 if (!queryString.isEmpty()) { 62 uri = uri + "?" + queryString; 63 } 64 65 Request.Builder reqBuilder = new Request.Builder().url(HOST + uri); 66 reqBuilder.addHeader("Accept", "application/json"); 67 reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId); 68 reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo, privateKey, METHOD, uri, null)); 69 reqBuilder.method(METHOD, null); 70 Request httpRequest = reqBuilder.build(); 71 72 // 发送HTTP请求 73 OkHttpClient client = new OkHttpClient.Builder().build(); 74 try (Response httpResponse = client.newCall(httpRequest).execute()) { 75 String respBody = WXPayUtility.extractBody(httpResponse); 76 if (httpResponse.code() >= 200 && httpResponse.code() < 300) { 77 // 2XX 成功,验证应答签名 78 WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey, 79 httpResponse.headers(), respBody); 80 81 // 从HTTP应答报文构建返回数据 82 return WXPayUtility.fromJson(respBody, QueryNegotiationHistoryV2Response.class); 83 } else { 84 throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers()); 85 } 86 } catch (IOException e) { 87 throw new UncheckedIOException("Sending request to " + uri + " failed.", e); 88 } 89 } 90 91 private final String mchid; 92 private final String certificateSerialNo; 93 private final PrivateKey privateKey; 94 private final String wechatPayPublicKeyId; 95 private final PublicKey wechatPayPublicKey; 96 97 public QueryNegotiationHistoryV2(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) { 98 this.mchid = mchid; 99 this.certificateSerialNo = certificateSerialNo; 100 this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath); 101 this.wechatPayPublicKeyId = wechatPayPublicKeyId; 102 this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath); 103 } 104 105 public static class QueryNegotiationHistoryV2Request { 106 @SerializedName("complaint_id") 107 @Expose(serialize = false) 108 public String complaintId; 109 110 @SerializedName("limit") 111 @Expose(serialize = false) 112 public Long limit; 113 114 @SerializedName("offset") 115 @Expose(serialize = false) 116 public Long offset; 117 } 118 119 public static class QueryNegotiationHistoryV2Response { 120 @SerializedName("data") 121 public List<ComplaintNegotiationHistoryWithLogId> data; 122 123 @SerializedName("limit") 124 public Long limit; 125 126 @SerializedName("offset") 127 public Long offset; 128 129 @SerializedName("total_count") 130 public Long totalCount; 131 } 132 133 public static class ComplaintNegotiationHistoryWithLogId { 134 @SerializedName("log_id") 135 public String logId; 136 137 @SerializedName("operator") 138 public String operator; 139 140 @SerializedName("operate_time") 141 public String operateTime; 142 143 @SerializedName("operate_type") 144 public ComplaintNegotiationOperateType operateType; 145 146 @SerializedName("operate_details") 147 public String operateDetails; 148 149 @SerializedName("image_list") 150 public List<String> imageList; 151 152 @SerializedName("complaint_media_list") 153 public ComplaintMedia complaintMediaList; 154 155 @SerializedName("user_appy_platform_service_reason") 156 public String userAppyPlatformServiceReason; 157 158 @SerializedName("user_appy_platform_service_reason_description") 159 public String userAppyPlatformServiceReasonDescription; 160 161 @SerializedName("normal_message") 162 public NormalMessage normalMessage; 163 164 @SerializedName("click_message") 165 public ClickMessage clickMessage; 166 } 167 168 public enum ComplaintNegotiationOperateType { 169 @SerializedName("USER_CREATE_COMPLAINT") 170 USER_CREATE_COMPLAINT, 171 @SerializedName("USER_CONTINUE_COMPLAINT") 172 USER_CONTINUE_COMPLAINT, 173 @SerializedName("USER_RESPONSE") 174 USER_RESPONSE, 175 @SerializedName("PLATFORM_RESPONSE") 176 PLATFORM_RESPONSE, 177 @SerializedName("MERCHANT_RESPONSE") 178 MERCHANT_RESPONSE, 179 @SerializedName("MERCHANT_CONFIRM_COMPLETE") 180 MERCHANT_CONFIRM_COMPLETE, 181 @SerializedName("USER_CREATE_COMPLAINT_SYSTEM_MESSAGE") 182 USER_CREATE_COMPLAINT_SYSTEM_MESSAGE, 183 @SerializedName("COMPLAINT_FULL_REFUNDED_SYSTEM_MESSAGE") 184 COMPLAINT_FULL_REFUNDED_SYSTEM_MESSAGE, 185 @SerializedName("USER_CONTINUE_COMPLAINT_SYSTEM_MESSAGE") 186 USER_CONTINUE_COMPLAINT_SYSTEM_MESSAGE, 187 @SerializedName("USER_REVOKE_COMPLAINT") 188 USER_REVOKE_COMPLAINT, 189 @SerializedName("USER_COMFIRM_COMPLAINT") 190 USER_COMFIRM_COMPLAINT, 191 @SerializedName("PLATFORM_HELP_APPLICATION") 192 PLATFORM_HELP_APPLICATION, 193 @SerializedName("USER_APPLY_PLATFORM_HELP") 194 USER_APPLY_PLATFORM_HELP, 195 @SerializedName("MERCHANT_APPROVE_REFUND") 196 MERCHANT_APPROVE_REFUND, 197 @SerializedName("MERCHANT_REFUSE_RERUND") 198 MERCHANT_REFUSE_RERUND, 199 @SerializedName("USER_SUBMIT_SATISFACTION") 200 USER_SUBMIT_SATISFACTION, 201 @SerializedName("SERVICE_ORDER_CANCEL") 202 SERVICE_ORDER_CANCEL, 203 @SerializedName("SERVICE_ORDER_COMPLETE") 204 SERVICE_ORDER_COMPLETE, 205 @SerializedName("COMPLAINT_PARTIAL_REFUNDED_SYSTEM_MESSAGE") 206 COMPLAINT_PARTIAL_REFUNDED_SYSTEM_MESSAGE, 207 @SerializedName("COMPLAINT_REFUND_RECEIVED_SYSTEM_MESSAGE") 208 COMPLAINT_REFUND_RECEIVED_SYSTEM_MESSAGE, 209 @SerializedName("COMPLAINT_ENTRUSTED_REFUND_SYSTEM_MESSAGE") 210 COMPLAINT_ENTRUSTED_REFUND_SYSTEM_MESSAGE, 211 @SerializedName("USER_APPLY_PLATFORM_SERVICE") 212 USER_APPLY_PLATFORM_SERVICE, 213 @SerializedName("USER_CANCEL_PLATFORM_SERVICE") 214 USER_CANCEL_PLATFORM_SERVICE, 215 @SerializedName("PLATFORM_SERVICE_FINISHED") 216 PLATFORM_SERVICE_FINISHED, 217 @SerializedName("USER_CLICK_RESPONSE") 218 USER_CLICK_RESPONSE 219 } 220 221 public static class ComplaintMedia { 222 @SerializedName("media_type") 223 public ComplaintMediaType mediaType; 224 225 @SerializedName("media_url") 226 public List<String> mediaUrl = new ArrayList<String>(); 227 } 228 229 public static class NormalMessage { 230 @SerializedName("blocks") 231 public List<Block> blocks; 232 233 @SerializedName("sender_identity") 234 public SenderIdentity senderIdentity; 235 236 @SerializedName("custom_data") 237 public String customData; 238 } 239 240 public static class ClickMessage { 241 @SerializedName("message_content") 242 public String messageContent; 243 244 @SerializedName("action_id") 245 public String actionId; 246 247 @SerializedName("clicked_log_id") 248 public String clickedLogId; 249 } 250 251 public enum ComplaintMediaType { 252 @SerializedName("USER_COMPLAINT_IMAGE") 253 USER_COMPLAINT_IMAGE, 254 @SerializedName("OPERATION_IMAGE") 255 OPERATION_IMAGE 256 } 257 258 public static class Block { 259 @SerializedName("type") 260 public BlockType type; 261 262 @SerializedName("text") 263 public Text text; 264 265 @SerializedName("image") 266 public Image image; 267 268 @SerializedName("link") 269 public Link link; 270 271 @SerializedName("faq_list") 272 public FaqList faqList; 273 274 @SerializedName("button") 275 public Button button; 276 277 @SerializedName("button_group") 278 public ButtonGroup buttonGroup; 279 } 280 281 public enum SenderIdentity { 282 @SerializedName("UNKNOWN") 283 UNKNOWN, 284 @SerializedName("MANUAL") 285 MANUAL, 286 @SerializedName("MACHINE") 287 MACHINE 288 } 289 290 public enum BlockType { 291 @SerializedName("TEXT") 292 TEXT, 293 @SerializedName("IMAGE") 294 IMAGE, 295 @SerializedName("LINK") 296 LINK, 297 @SerializedName("FAQ_LIST") 298 FAQ_LIST, 299 @SerializedName("BUTTON") 300 BUTTON, 301 @SerializedName("BUTTON_GROUP") 302 BUTTON_GROUP 303 } 304 305 public static class Text { 306 @SerializedName("text") 307 public String text; 308 309 @SerializedName("color") 310 public TextColor color; 311 312 @SerializedName("is_bold") 313 public Boolean isBold; 314 } 315 316 public static class Image { 317 @SerializedName("media_id") 318 public String mediaId; 319 320 @SerializedName("image_style_type") 321 public ImageStyleType imageStyleType; 322 } 323 324 public static class Link { 325 @SerializedName("text") 326 public String text; 327 328 @SerializedName("action") 329 public ClickAction action; 330 331 @SerializedName("invalid_info") 332 public InvalidInfo invalidInfo; 333 } 334 335 public static class FaqList { 336 @SerializedName("faqs") 337 public List<FaqListItem> faqs; 338 } 339 340 public static class Button { 341 @SerializedName("text") 342 public String text; 343 344 @SerializedName("action") 345 public ClickAction action; 346 347 @SerializedName("invalid_info") 348 public InvalidInfo invalidInfo; 349 } 350 351 public static class ButtonGroup { 352 @SerializedName("buttons") 353 public List<Button> buttons; 354 355 @SerializedName("button_layout") 356 public ButtonLayout buttonLayout; 357 358 @SerializedName("invalid_info") 359 public InvalidInfo invalidInfo; 360 } 361 362 public enum TextColor { 363 @SerializedName("DEFAULT") 364 DEFAULT, 365 @SerializedName("SECONDARY") 366 SECONDARY 367 } 368 369 public enum ImageStyleType { 370 @SerializedName("IMAGE_STYLE_TYPE_NARROW") 371 IMAGE_STYLE_TYPE_NARROW, 372 @SerializedName("IMAGE_STYLE_TYPE_WIDE") 373 IMAGE_STYLE_TYPE_WIDE 374 } 375 376 public static class ClickAction { 377 @SerializedName("action_type") 378 public ActionType actionType; 379 380 @SerializedName("jump_url") 381 public String jumpUrl; 382 383 @SerializedName("mini_program_jump_info") 384 public MiniProgramJumpInfo miniProgramJumpInfo; 385 386 @SerializedName("message_info") 387 public MessageInfo messageInfo; 388 389 @SerializedName("action_id") 390 public String actionId; 391 } 392 393 public static class InvalidInfo { 394 @SerializedName("expired_time") 395 public String expiredTime; 396 397 @SerializedName("multi_clickable") 398 public Boolean multiClickable; 399 } 400 401 public static class FaqListItem { 402 @SerializedName("faq_id") 403 public String faqId; 404 405 @SerializedName("faq_title") 406 public String faqTitle; 407 408 @SerializedName("action") 409 public ClickAction action; 410 } 411 412 public enum ButtonLayout { 413 @SerializedName("LAYOUT_UNKNOWN") 414 LAYOUT_UNKNOWN, 415 @SerializedName("LAYOUT_HORIZONTAL") 416 LAYOUT_HORIZONTAL, 417 @SerializedName("LAYOUT_VERTICAL") 418 LAYOUT_VERTICAL 419 } 420 421 public enum ActionType { 422 @SerializedName("ACTION_TYPE_SEND_MESSAGE") 423 ACTION_TYPE_SEND_MESSAGE, 424 @SerializedName("ACTION_TYPE_JUMP_URL") 425 ACTION_TYPE_JUMP_URL, 426 @SerializedName("ACTION_TYPE_JUMP_MINI_PROGRAM") 427 ACTION_TYPE_JUMP_MINI_PROGRAM 428 } 429 430 public static class MiniProgramJumpInfo { 431 @SerializedName("appid") 432 public String appid; 433 434 @SerializedName("path") 435 public String path; 436 437 @SerializedName("text") 438 public String text; 439 } 440 441 public static class MessageInfo { 442 @SerializedName("content") 443 public String content; 444 445 @SerializedName("custom_data") 446 public String customData; 447 } 448 449} 450
需配合微信支付工具库 wxpay_utility 使用,请参考Go
1package main 2 3import ( 4 "demo/wxpay_utility" // 引用微信支付工具库,参考 https://pay.weixin.qq.com/doc/v3/partner/4015119446 5 "encoding/json" 6 "fmt" 7 "net/http" 8 "net/url" 9 "strings" 10) 11 12func main() { 13 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/partner/4013080340 14 config, err := wxpay_utility.CreateMchConfig( 15 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340 16 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924 17 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 18 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589 19 "/path/to/wxp_pub.pem", // 微信支付公钥文件路径,本地文件路径 20 ) 21 if err != nil { 22 fmt.Println(err) 23 return 24 } 25 26 request := &QueryNegotiationHistoryV2Request{ 27 ComplaintId: wxpay_utility.String("200201820200101080076610000"), 28 Limit: wxpay_utility.Int64(50), 29 Offset: wxpay_utility.Int64(10), 30 } 31 32 response, err := QueryNegotiationHistoryV2(config, request) 33 if err != nil { 34 fmt.Printf("请求失败: %+v\n", err) 35 // TODO: 请求失败,根据状态码执行不同的处理 36 return 37 } 38 39 // TODO: 请求成功,继续业务逻辑 40 fmt.Printf("请求成功: %+v\n", response) 41} 42 43func QueryNegotiationHistoryV2(config *wxpay_utility.MchConfig, request *QueryNegotiationHistoryV2Request) (response *QueryNegotiationHistoryV2Response, err error) { 44 const ( 45 host = "https://api.mch.weixin.qq.com" 46 method = "GET" 47 path = "/v3/merchant-service/complaints-v2/{complaint_id}/negotiation-historys" 48 ) 49 50 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path)) 51 if err != nil { 52 return nil, err 53 } 54 reqUrl.Path = strings.Replace(reqUrl.Path, "{complaint_id}", url.PathEscape(*request.ComplaintId), -1) 55 query := reqUrl.Query() 56 if request.Limit != nil { 57 query.Add("limit", fmt.Sprintf("%v", *request.Limit)) 58 } 59 if request.Offset != nil { 60 query.Add("offset", fmt.Sprintf("%v", *request.Offset)) 61 } 62 reqUrl.RawQuery = query.Encode() 63 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 64 if err != nil { 65 return nil, err 66 } 67 httpRequest.Header.Set("Accept", "application/json") 68 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 69 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 70 if err != nil { 71 return nil, err 72 } 73 httpRequest.Header.Set("Authorization", authorization) 74 75 client := &http.Client{} 76 httpResponse, err := client.Do(httpRequest) 77 if err != nil { 78 return nil, err 79 } 80 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 81 if err != nil { 82 return nil, err 83 } 84 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 85 // 2XX 成功,验证应答签名 86 err = wxpay_utility.ValidateResponse( 87 config.WechatPayPublicKeyId(), 88 config.WechatPayPublicKey(), 89 &httpResponse.Header, 90 respBody, 91 ) 92 if err != nil { 93 return nil, err 94 } 95 response := &QueryNegotiationHistoryV2Response{} 96 if err := json.Unmarshal(respBody, response); err != nil { 97 return nil, err 98 } 99 100 return response, nil 101 } else { 102 return nil, wxpay_utility.NewApiException( 103 httpResponse.StatusCode, 104 httpResponse.Header, 105 respBody, 106 ) 107 } 108} 109 110type QueryNegotiationHistoryV2Request struct { 111 ComplaintId *string `json:"complaint_id,omitempty"` 112 Limit *int64 `json:"limit,omitempty"` 113 Offset *int64 `json:"offset,omitempty"` 114} 115 116func (o *QueryNegotiationHistoryV2Request) MarshalJSON() ([]byte, error) { 117 type Alias QueryNegotiationHistoryV2Request 118 a := &struct { 119 ComplaintId *string `json:"complaint_id,omitempty"` 120 Limit *int64 `json:"limit,omitempty"` 121 Offset *int64 `json:"offset,omitempty"` 122 *Alias 123 }{ 124 // 序列化时移除非 Body 字段 125 ComplaintId: nil, 126 Limit: nil, 127 Offset: nil, 128 Alias: (*Alias)(o), 129 } 130 return json.Marshal(a) 131} 132 133type QueryNegotiationHistoryV2Response struct { 134 Data []ComplaintNegotiationHistoryWithLogId `json:"data,omitempty"` 135 Limit *int64 `json:"limit,omitempty"` 136 Offset *int64 `json:"offset,omitempty"` 137 TotalCount *int64 `json:"total_count,omitempty"` 138} 139 140type ComplaintNegotiationHistoryWithLogId struct { 141 LogId *string `json:"log_id,omitempty"` 142 Operator *string `json:"operator,omitempty"` 143 OperateTime *string `json:"operate_time,omitempty"` 144 OperateType *ComplaintNegotiationOperateType `json:"operate_type,omitempty"` 145 OperateDetails *string `json:"operate_details,omitempty"` 146 ImageList []string `json:"image_list,omitempty"` 147 ComplaintMediaList *ComplaintMedia `json:"complaint_media_list,omitempty"` 148 UserAppyPlatformServiceReason *string `json:"user_appy_platform_service_reason,omitempty"` 149 UserAppyPlatformServiceReasonDescription *string `json:"user_appy_platform_service_reason_description,omitempty"` 150 NormalMessage *NormalMessage `json:"normal_message,omitempty"` 151 ClickMessage *ClickMessage `json:"click_message,omitempty"` 152} 153 154type ComplaintNegotiationOperateType string 155 156func (e ComplaintNegotiationOperateType) Ptr() *ComplaintNegotiationOperateType { 157 return &e 158} 159 160const ( 161 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CREATE_COMPLAINT ComplaintNegotiationOperateType = "USER_CREATE_COMPLAINT" 162 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CONTINUE_COMPLAINT ComplaintNegotiationOperateType = "USER_CONTINUE_COMPLAINT" 163 COMPLAINTNEGOTIATIONOPERATETYPE_USER_RESPONSE ComplaintNegotiationOperateType = "USER_RESPONSE" 164 COMPLAINTNEGOTIATIONOPERATETYPE_PLATFORM_RESPONSE ComplaintNegotiationOperateType = "PLATFORM_RESPONSE" 165 COMPLAINTNEGOTIATIONOPERATETYPE_MERCHANT_RESPONSE ComplaintNegotiationOperateType = "MERCHANT_RESPONSE" 166 COMPLAINTNEGOTIATIONOPERATETYPE_MERCHANT_CONFIRM_COMPLETE ComplaintNegotiationOperateType = "MERCHANT_CONFIRM_COMPLETE" 167 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CREATE_COMPLAINT_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "USER_CREATE_COMPLAINT_SYSTEM_MESSAGE" 168 COMPLAINTNEGOTIATIONOPERATETYPE_COMPLAINT_FULL_REFUNDED_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "COMPLAINT_FULL_REFUNDED_SYSTEM_MESSAGE" 169 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CONTINUE_COMPLAINT_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "USER_CONTINUE_COMPLAINT_SYSTEM_MESSAGE" 170 COMPLAINTNEGOTIATIONOPERATETYPE_USER_REVOKE_COMPLAINT ComplaintNegotiationOperateType = "USER_REVOKE_COMPLAINT" 171 COMPLAINTNEGOTIATIONOPERATETYPE_USER_COMFIRM_COMPLAINT ComplaintNegotiationOperateType = "USER_COMFIRM_COMPLAINT" 172 COMPLAINTNEGOTIATIONOPERATETYPE_PLATFORM_HELP_APPLICATION ComplaintNegotiationOperateType = "PLATFORM_HELP_APPLICATION" 173 COMPLAINTNEGOTIATIONOPERATETYPE_USER_APPLY_PLATFORM_HELP ComplaintNegotiationOperateType = "USER_APPLY_PLATFORM_HELP" 174 COMPLAINTNEGOTIATIONOPERATETYPE_MERCHANT_APPROVE_REFUND ComplaintNegotiationOperateType = "MERCHANT_APPROVE_REFUND" 175 COMPLAINTNEGOTIATIONOPERATETYPE_MERCHANT_REFUSE_RERUND ComplaintNegotiationOperateType = "MERCHANT_REFUSE_RERUND" 176 COMPLAINTNEGOTIATIONOPERATETYPE_USER_SUBMIT_SATISFACTION ComplaintNegotiationOperateType = "USER_SUBMIT_SATISFACTION" 177 COMPLAINTNEGOTIATIONOPERATETYPE_SERVICE_ORDER_CANCEL ComplaintNegotiationOperateType = "SERVICE_ORDER_CANCEL" 178 COMPLAINTNEGOTIATIONOPERATETYPE_SERVICE_ORDER_COMPLETE ComplaintNegotiationOperateType = "SERVICE_ORDER_COMPLETE" 179 COMPLAINTNEGOTIATIONOPERATETYPE_COMPLAINT_PARTIAL_REFUNDED_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "COMPLAINT_PARTIAL_REFUNDED_SYSTEM_MESSAGE" 180 COMPLAINTNEGOTIATIONOPERATETYPE_COMPLAINT_REFUND_RECEIVED_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "COMPLAINT_REFUND_RECEIVED_SYSTEM_MESSAGE" 181 COMPLAINTNEGOTIATIONOPERATETYPE_COMPLAINT_ENTRUSTED_REFUND_SYSTEM_MESSAGE ComplaintNegotiationOperateType = "COMPLAINT_ENTRUSTED_REFUND_SYSTEM_MESSAGE" 182 COMPLAINTNEGOTIATIONOPERATETYPE_USER_APPLY_PLATFORM_SERVICE ComplaintNegotiationOperateType = "USER_APPLY_PLATFORM_SERVICE" 183 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CANCEL_PLATFORM_SERVICE ComplaintNegotiationOperateType = "USER_CANCEL_PLATFORM_SERVICE" 184 COMPLAINTNEGOTIATIONOPERATETYPE_PLATFORM_SERVICE_FINISHED ComplaintNegotiationOperateType = "PLATFORM_SERVICE_FINISHED" 185 COMPLAINTNEGOTIATIONOPERATETYPE_USER_CLICK_RESPONSE ComplaintNegotiationOperateType = "USER_CLICK_RESPONSE" 186) 187 188type ComplaintMedia struct { 189 MediaType *ComplaintMediaType `json:"media_type,omitempty"` 190 MediaUrl []string `json:"media_url,omitempty"` 191} 192 193type NormalMessage struct { 194 Blocks []Block `json:"blocks,omitempty"` 195 SenderIdentity *SenderIdentity `json:"sender_identity,omitempty"` 196 CustomData *string `json:"custom_data,omitempty"` 197} 198 199type ClickMessage struct { 200 MessageContent *string `json:"message_content,omitempty"` 201 ActionId *string `json:"action_id,omitempty"` 202 ClickedLogId *string `json:"clicked_log_id,omitempty"` 203} 204 205type ComplaintMediaType string 206 207func (e ComplaintMediaType) Ptr() *ComplaintMediaType { 208 return &e 209} 210 211const ( 212 COMPLAINTMEDIATYPE_USER_COMPLAINT_IMAGE ComplaintMediaType = "USER_COMPLAINT_IMAGE" 213 COMPLAINTMEDIATYPE_OPERATION_IMAGE ComplaintMediaType = "OPERATION_IMAGE" 214) 215 216type Block struct { 217 Type *BlockType `json:"type,omitempty"` 218 Text *Text `json:"text,omitempty"` 219 Image *Image `json:"image,omitempty"` 220 Link *Link `json:"link,omitempty"` 221 FaqList *FaqList `json:"faq_list,omitempty"` 222 Button *Button `json:"button,omitempty"` 223 ButtonGroup *ButtonGroup `json:"button_group,omitempty"` 224} 225 226type SenderIdentity string 227 228func (e SenderIdentity) Ptr() *SenderIdentity { 229 return &e 230} 231 232const ( 233 SENDERIDENTITY_UNKNOWN SenderIdentity = "UNKNOWN" 234 SENDERIDENTITY_MANUAL SenderIdentity = "MANUAL" 235 SENDERIDENTITY_MACHINE SenderIdentity = "MACHINE" 236) 237 238type BlockType string 239 240func (e BlockType) Ptr() *BlockType { 241 return &e 242} 243 244const ( 245 BLOCKTYPE_TEXT BlockType = "TEXT" 246 BLOCKTYPE_IMAGE BlockType = "IMAGE" 247 BLOCKTYPE_LINK BlockType = "LINK" 248 BLOCKTYPE_FAQ_LIST BlockType = "FAQ_LIST" 249 BLOCKTYPE_BUTTON BlockType = "BUTTON" 250 BLOCKTYPE_BUTTON_GROUP BlockType = "BUTTON_GROUP" 251) 252 253type Text struct { 254 Text *string `json:"text,omitempty"` 255 Color *TextColor `json:"color,omitempty"` 256 IsBold *bool `json:"is_bold,omitempty"` 257} 258 259type Image struct { 260 MediaId *string `json:"media_id,omitempty"` 261 ImageStyleType *ImageStyleType `json:"image_style_type,omitempty"` 262} 263 264type Link struct { 265 Text *string `json:"text,omitempty"` 266 Action *ClickAction `json:"action,omitempty"` 267 InvalidInfo *InvalidInfo `json:"invalid_info,omitempty"` 268} 269 270type FaqList struct { 271 Faqs []FaqListItem `json:"faqs,omitempty"` 272} 273 274type Button struct { 275 Text *string `json:"text,omitempty"` 276 Action *ClickAction `json:"action,omitempty"` 277 InvalidInfo *InvalidInfo `json:"invalid_info,omitempty"` 278} 279 280type ButtonGroup struct { 281 Buttons []Button `json:"buttons,omitempty"` 282 ButtonLayout *ButtonLayout `json:"button_layout,omitempty"` 283 InvalidInfo *InvalidInfo `json:"invalid_info,omitempty"` 284} 285 286type TextColor string 287 288func (e TextColor) Ptr() *TextColor { 289 return &e 290} 291 292const ( 293 TEXTCOLOR_DEFAULT TextColor = "DEFAULT" 294 TEXTCOLOR_SECONDARY TextColor = "SECONDARY" 295) 296 297type ImageStyleType string 298 299func (e ImageStyleType) Ptr() *ImageStyleType { 300 return &e 301} 302 303const ( 304 IMAGESTYLETYPE_IMAGE_STYLE_TYPE_NARROW ImageStyleType = "IMAGE_STYLE_TYPE_NARROW" 305 IMAGESTYLETYPE_IMAGE_STYLE_TYPE_WIDE ImageStyleType = "IMAGE_STYLE_TYPE_WIDE" 306) 307 308type ClickAction struct { 309 ActionType *ActionType `json:"action_type,omitempty"` 310 JumpUrl *string `json:"jump_url,omitempty"` 311 MiniProgramJumpInfo *MiniProgramJumpInfo `json:"mini_program_jump_info,omitempty"` 312 MessageInfo *MessageInfo `json:"message_info,omitempty"` 313 ActionId *string `json:"action_id,omitempty"` 314} 315 316type InvalidInfo struct { 317 ExpiredTime *string `json:"expired_time,omitempty"` 318 MultiClickable *bool `json:"multi_clickable,omitempty"` 319} 320 321type FaqListItem struct { 322 FaqId *string `json:"faq_id,omitempty"` 323 FaqTitle *string `json:"faq_title,omitempty"` 324 Action *ClickAction `json:"action,omitempty"` 325} 326 327type ButtonLayout string 328 329func (e ButtonLayout) Ptr() *ButtonLayout { 330 return &e 331} 332 333const ( 334 BUTTONLAYOUT_LAYOUT_UNKNOWN ButtonLayout = "LAYOUT_UNKNOWN" 335 BUTTONLAYOUT_LAYOUT_HORIZONTAL ButtonLayout = "LAYOUT_HORIZONTAL" 336 BUTTONLAYOUT_LAYOUT_VERTICAL ButtonLayout = "LAYOUT_VERTICAL" 337) 338 339type ActionType string 340 341func (e ActionType) Ptr() *ActionType { 342 return &e 343} 344 345const ( 346 ACTIONTYPE_ACTION_TYPE_SEND_MESSAGE ActionType = "ACTION_TYPE_SEND_MESSAGE" 347 ACTIONTYPE_ACTION_TYPE_JUMP_URL ActionType = "ACTION_TYPE_JUMP_URL" 348 ACTIONTYPE_ACTION_TYPE_JUMP_MINI_PROGRAM ActionType = "ACTION_TYPE_JUMP_MINI_PROGRAM" 349) 350 351type MiniProgramJumpInfo struct { 352 Appid *string `json:"appid,omitempty"` 353 Path *string `json:"path,omitempty"` 354 Text *string `json:"text,omitempty"` 355} 356 357type MessageInfo struct { 358 Content *string `json:"content,omitempty"` 359 CustomData *string `json:"custom_data,omitempty"` 360} 361
应答参数
200 OK
data 选填 array[object]
【投诉协商历史】 投诉协商历史
| 属性 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
log_id 必填 string(64) 【操作流水号】 操作流水号 operator 必填 string(64) 【操作人】 当前投诉协商记录的操作人 operate_time 必填 string(64) 【操作时间】 当前投诉协商记录的操作时间 operate_type 必填 string 【操作类型】 当前投诉协商记录的操作类型,对应枚举ComplaintNegotiationOperateType 可选取值
operate_details 选填 string(500) 【操作内容】 当前投诉协商记录的具体内容 image_list 选填 array[string] 【图片凭证】 商户或微信支付客服上传的图片,以URL形式返回。注:此字段不包含用户提交的图片凭证,建议统一使用complaint_media_list字段接收和请求资料凭证,未来该字段将废弃 complaint_media_list 选填 object 【操作资料列表】 对投诉单执行操作时上传的资料凭证,包含用户、商户、微信支付客服等角色操作
user_appy_platform_service_reason 选填 string 【用户申请平台协助原因】 用户此次申请平台协助时选择的申请协助原因(已废弃) user_appy_platform_service_reason_description 选填 string 【用户申请平台协助原因描述】 用户此次申请平台协助时填写的具体申请协助原因描述(已废弃) normal_message 选填 object 【普通消息内容】 当operate_type为MERCHANT_RESPONSE且商户使用即时服务回复接口ResponseComplaintImmediateService发送商户回复时,此字段有值。与发送消息的结构一致
click_message 选填 object 【用户点击回复消息】 用户点击回复消息,当operate_type为USER_CLICK_RESPONSE时,此字段有值
|
limit 必填 integer
【分页大小】 设置该次请求返回的最大协商历史条数,范围[1,300]
offset 必填 integer
【分页开始位置】 设置该次请求返回的最大协商历史条数,范围[1,300]
total_count 选填 integer
【投诉协商历史总条数】 投诉协商历史总条数,当offset=0时返回
应答示例
200 OK
1{ 2 "data" : [ 3 { 4 "log_id" : "300285320210322170000071077", 5 "operator" : "投诉人", 6 "operate_time" : "2015-05-20T13:29:35.120+08:00", 7 "operate_type" : "USER_CREATE_COMPLAINT", 8 "operate_details" : "已与用户电话沟通解决", 9 "image_list" : [ 10 "https://qpic.cn/xxx" 11 ], 12 "complaint_media_list" : { 13 "media_type" : "USER_COMPLAINT_IMAGE", 14 "media_url" : [ 15 "https://api.mch.weixin.qq.com/v3/merchant-service/images/xxxxx" 16 ] 17 }, 18 "user_appy_platform_service_reason" : "商家响应不及时", 19 "user_appy_platform_service_reason_description" : "一周前就提交咨询了,到现在商家还没理我", 20 "normal_message" : { 21 "blocks" : [ 22 { 23 "type" : "TEXT", 24 "text" : { 25 "text" : "example_text", 26 "color" : "DEFAULT", 27 "is_bold" : false 28 }, 29 "image" : { 30 "media_id" : "example_media_id", 31 "image_style_type" : "IMAGE_STYLE_TYPE_NARROW" 32 }, 33 "link" : { 34 "text" : "example_text", 35 "action" : { 36 "action_type" : "ACTION_TYPE_SEND_MESSAGE", 37 "jump_url" : "example_jump_url", 38 "mini_program_jump_info" : { 39 "appid" : "wx416b02c1dd71u132", 40 "path" : "/pages/index/index", 41 "text" : "首页" 42 }, 43 "message_info" : { 44 "content" : "example_content", 45 "custom_data" : "example_custom_data" 46 }, 47 "action_id" : "example_action_id" 48 }, 49 "invalid_info" : { 50 "expired_time" : "example_expired_time", 51 "multi_clickable" : false 52 } 53 }, 54 "faq_list" : { 55 "faqs" : [ 56 { 57 "faq_id" : "example_faq_id", 58 "faq_title" : "example_faq_title", 59 "action" : { 60 "action_type" : "ACTION_TYPE_SEND_MESSAGE", 61 "jump_url" : "example_jump_url", 62 "mini_program_jump_info" : { 63 "appid" : "wx416b02c1dd71u132", 64 "path" : "/pages/index/index", 65 "text" : "首页" 66 }, 67 "message_info" : { 68 "content" : "example_content", 69 "custom_data" : "example_custom_data" 70 }, 71 "action_id" : "example_action_id" 72 } 73 } 74 ] 75 }, 76 "button" : { 77 "text" : "example_text", 78 "action" : { 79 "action_type" : "ACTION_TYPE_SEND_MESSAGE", 80 "jump_url" : "example_jump_url", 81 "mini_program_jump_info" : { 82 "appid" : "wx416b02c1dd71u132", 83 "path" : "/pages/index/index", 84 "text" : "首页" 85 }, 86 "message_info" : { 87 "content" : "example_content", 88 "custom_data" : "example_custom_data" 89 }, 90 "action_id" : "example_action_id" 91 }, 92 "invalid_info" : { 93 "expired_time" : "example_expired_time", 94 "multi_clickable" : false 95 } 96 }, 97 "button_group" : { 98 "buttons" : [ 99 { 100 "text" : "example_text", 101 "action" : { 102 "action_type" : "ACTION_TYPE_SEND_MESSAGE", 103 "jump_url" : "example_jump_url", 104 "mini_program_jump_info" : { 105 "appid" : "wx416b02c1dd71u132", 106 "path" : "/pages/index/index", 107 "text" : "首页" 108 }, 109 "message_info" : { 110 "content" : "example_content", 111 "custom_data" : "example_custom_data" 112 }, 113 "action_id" : "example_action_id" 114 }, 115 "invalid_info" : { 116 "expired_time" : "example_expired_time", 117 "multi_clickable" : false 118 } 119 } 120 ], 121 "button_layout" : "LAYOUT_UNKNOWN", 122 "invalid_info" : { 123 "expired_time" : "example_expired_time", 124 "multi_clickable" : false 125 } 126 } 127 } 128 ], 129 "sender_identity" : "UNKNOWN", 130 "custom_data" : "example_custom_data" 131 }, 132 "click_message" : { 133 "message_content" : "example_message_content", 134 "action_id" : "12345", 135 "clicked_log_id" : "example_clicked_log_id" 136 } 137 } 138 ], 139 "limit" : 50, 140 "offset" : 50, 141 "total_count" : 1000 142} 143
错误码
以下是本接口返回的错误码列表。详细错误码规则,请参考微信支付接口规则-错误码和错误提示

