# 获取小程序申诉记录

调试诊断

接口应在服务器端调用,不可在前端(小程序、网页、APP等)直接调用,具体可参考接口调用指南

接口英文名:getAppealRecords

调用本 API 可以获取小程序的申诉记录。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。

# 1. 调用方式

# HTTPS 调用

POST https://api.weixin.qq.com/wxa/getappealrecords?access_token=ACCESS_TOKEN

# 云调用

  • 本接口不支持云调用

# 第三方调用

  • 本接口支持第三方平台代商家调用。

  • 该接口所属的权限集 id 为:76

  • 服务商获得其中之一权限集授权后,可通过使用 authorizer_access_token 代商家进行调用,具体可查看 第三方调用 说明文档。

# 2. 请求参数

# 查询参数 Query String parameters

参数名类型必填说明
access_tokenstring接口调用凭证,可使用 access_tokenauthorizer_access_token

# 请求体 Request Payload

参数名类型必填说明
illegal_record_idstring违规处罚记录id(通过getillegalrecords接口返回的记录id)

# 3. 返回参数

# 返回体 Response Payload

参数名类型说明
errcodenumber返回码
errmsgstring错误信息
recordsobjarray申诉记录列表

# Res.records(Array) Object Payload

申诉记录列表

参数名类型说明
appeal_record_idnumber申诉单id
appeal_timenumber申诉时间
appeal_countnumber申诉次数
appeal_fromnumber申诉来源(0--用户,1--服务商)
appeal_statusnumber申诉状态
audit_timenumber审核时间
audit_reasonstring审核结果理由
punish_descriptionstring处罚原因描述
materialsobjarray违规材料和申诉材料

# Res.records(Array).materialsObject Payload

违规材料和申诉材料

参数名类型说明
illegal_materialobject违规材料
appeal_materialobject申诉材料(针对违规材料提供的资料)

# Res.records(Array).materials.illegal_material Object Payload

违规材料

参数名类型说明
contentstring违规内容
content_urlstring违规链接

# Res.records(Array).materials.appeal_material Object Payload

申诉材料(针对违规材料提供的资料)

参数名类型说明
reasonstring申诉理由
proof_material_idsarray证明材料列表(可以通过“获取临时素材”接口下载对应的材料)

# 4. 注意事项

调用该接口,需要小程序将18、76的权限集授权给第三方平台;

# 其他说明

# 申诉状态appeal_status说明

含义
1 正在处理
2 申诉不通过
3 申诉通过
4 申诉已撤销

# 小程序申诉记录推送

当小程序发起申诉或者申诉审核状态改变后,微信服务器会向第三方平台的消息与事件接收 URL(创建时由第三方平台填写)以POST的方式推送该通知,详情见消息推送文档

除了消息通知之外,第三方平台也可通过接口查询小程序的申诉记录

# 字段说明

参数 类型 说明
ToUserName string 小程序的原始 ID
FromUserName string 发送方账号(一个 OpenID,此时发送方是系统账号)
CreateTime number 消息创建的时间戳
MsgType string 消息类型 event
Event string 事件类型,这里是wxa_appeal_record
appeal_record_id number 申诉单id
appid string 小程序id
appeal_time number 申诉时间
appeal_count number 申诉次数
appeal_from number 申诉来源(0--用户,1--服务商)
appeal_status number 申诉状态
audit_time number 审核时间(“正在处理”或者“撤销”状态,不返回该字段)
audit_reason string 审核结果理由(“正在处理”或者“撤销”状态,不返回该字段)
punish_description string 处罚原因描述
material object array 违规材料和申诉材料
illegal_material object 违规材料
content string 违规内容
content_url string 违规链接
appeal_material object 申诉材料
reason string 申诉理由
proof_material_id string 申诉材料id(可以通过“获取临时素材”接口下载对应的材料)

# 字段其他说明

# 推送内容解密后的示例:

<xml>
    <ToUserName><![CDATA[gh_fxxxxxxxa4b2]]></ToUserName>
    <FromUserName><![CDATA[odxxxxM-xxxxxxxx-trm4a7apsU8]]></FromUserName>
    <CreateTime>1600055810</CreateTime>
    <MsgType><![CDATA[event]]></MsgType>
    <Event><![CDATA[wxa_appeal_record]]></Event>
    <appeal_record_id>4111001</appeal_record_id>
    <appid>wxaaaaaaaaaaaaaaaa</appid> 
    <appeal_time>1600055800</appeal_time>
    <appeal_count>1</appeal_count>
    <appeal_from>0</appeal_from>
    <appeal_status>1|2|3|4</appeal_status>
    <punish_description>内容涉嫌欺诈</punish_description>
    <material>
        <illegal_material>
            <content>违规内容1</content>
            <content_url>https://xxxxx</content_url>
        </illegal_material>
        <appeal_material>
            <reason>内容是正常的</reason>
            <proof_material_id>xxxx</proof_material_id>
            <proof_material_id>yyyy</proof_material_id>
        </appeal_material>
    </material>
    <material>
        <illegal_material>
            <content>违规内容2</content>
            <content_url>https://yyyyy</content_url>
        </illegal_material>
        <appeal_material>
            <reason>内容是正常的</reason>
            <proof_material_id>zzzz</proof_material_id>
        </appeal_material>
    </material>
</xml>

# 5. 代码示例

请求示例

{
  "illegal_record_id": "2_11100"
}

返回示例

{
    "errcode": 0,
    "errmsg": "ok",
    "records": [
        {
            "appeal_record_id": 4111001,
            "appeal_time": 1600055800,
            "appeal_from": 0,
            "appeal_status": 1,
            "punish_description": "内容涉嫌欺诈",
            "materials": [
                {
                    "illegal_material": {
                        "content": "违规内容1,
                        "content_url": "https://xxxxx"
                    },
                    "appeal_material": {
                        "reason": "内容是正常的",
                        "proof_material_ids": [
                            "xxxx",
                            "xxxx"
                        ]
                    }
                },
                {
                    "illegal_material": {
                        "content": "违规内容2,
                        "content_url": "https://yyyyy"
                    },
                    "appeal_material": {
                        "reason": "内容是正常的",
                        "proof_material_ids": [
                            "zzzz"
                        ]
                    }
                }
            ]
        }
    ]
}

# 6. 错误码

以下是本接口的错误码列表,其他错误码可参考 通用错误码;调用接口遇到报错,可使用官方提供的 API 诊断工具 辅助定位和分析问题。

错误码错误描述解决方案
-1system error系统繁忙,此时请开发者稍候再试

# 7. 适用范围

本接口支持「第三方平台」账号类型代调用,权限集请参考「调用方式」部分。其他账号类型如无特殊说明,均不可调用。