# 按部门查询补贴台账

# 接口说明

此接口用于按部门查询每天的补贴结余情况,服务商可以通过该接口获取每日补贴结余情况用于封账

# 请求地址

https://open.wecard.qq.com/cgi-bin/pay/provider/get-sub-balance-by-org

# access_token 获取

参考 https://wiki.weixiao.qq.com/api/third/oauth/access_token.html

# 请求方式

GET

# 请求参数

参数 是否必填 类型 实例 说明
access_token String 应用有效凭证
start_date String 20231101 开始日期,格式为YYYYmmdd
end_date String 20231102 结束日期,格式为YYYYmmdd(仅能查询30天内的数据)
org_ids String -1,798,488683 需要查询的部门id,多个部门已英文逗号隔开
wallet_ids String 1010343033_99679503,1010343033_99679312 需要查询的补贴钱包id,多个id以英文逗号隔开

请求示例

/cgi-bin/pay/provider/get-sub-balance-by-org?access_token={{access_token}}&start_date=20231102&end_date=20231102&org_ids=-1,798,488683&wallet_ids=1010343033_99679503,1010343033_99679312

# 返回参数

参数 类型 说明
返回码 String 主体code
message String 返回说明
data date String 日期
appid String 核算单位id
app_name String 核算单位名称
org_id Integer 部门id
org_name String 部门名称
wallet_id Integer 钱包id
wallet_name String 钱包名称
balance Integer 余额(单位:分)

返回示例

{
  "code": 0,
  "data": [
    {
        "date": "20231101",
        "appid": "1010343033",
        "app_name": "默认核算单位", 
        "org_id": -1,
        "org_name": "未分组",
        "wallet_id": "1010343033_99679312",
        "wallet_name": "我就要改",
        "balance": 194
    }
  ],
  "message": "成功"
}