taobao.bill.book.bills.get (查询虚拟账户明细数据(自研发商家专用))

查询虚拟账户明细数据

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
fields String 必须 bid,account_id,journal_type,amount,book_time
  • 最大长度:300
  • 需要返回的字段:bid,account_id,journal_type,amount,book_time,description,gmt_create,gmt_modified ,如果不是以上字段将自动忽略
    journal_types Number [] 可选 1,2,3,4,5,6
  • 最大列表长度:10
  • 明细流水类型:流水类型:101、可用金充值;102、可用金扣除;103、冻结;104、解冻;105、冻结金充值;106、冻结金扣除
    account_id Number 必须 20001021 虚拟账户科目编号
    end_time Date 必须 2013-01-14 09:56:48 记账结束时间,end_time与start_time相差不能超过30天
    start_time Date 必须 2013-01-14 10:05:25 记账开始时间
    page_no Number 可选 1
  • 默认值:1
  • 页码,传入值为1代表第一页,传入值为2代表第二页,依此类推.默认返回的数据是从第一页开始
    page_size Number 可选 40
  • 默认值:40
  • 每页大小,建议40~100,不能超过100

    响应参数

    名称 类型 示例值 描述
    has_next Boolean false 是否有下一页
    total_results Number 20 当前查询的结果数,非总数
    bills BookBill [] 虚拟账户账单列表
    • └ amount
    • Number
    • 10000
    • 操作金额
    • └ journal_type
    • Number
    • 101
    • 流水类型:101-可用金充值;102-可用金扣除;103-冻结;104-解冻;105-冻结金充值;106-冻结金扣除
    • └ gmt_create
    • Date
    • 2013-01-13 04:47:12
    • 创建时间
    • └ account_id
    • Number
    • 20001021
    • 虚拟账户科目编号
    • └ description
    • String
    • 可用金充值
    • 备注
    • └ taobao_alipay_id
    • String
    • 12345
    • 流水的淘宝支付宝id
    • └ other_alipay_id
    • String
    • 12345
    • 流水的商家支付宝id
    • └ book_time
    • Date
    • 2013-01-13 04:47:12
    • 记账时间
    • └ bid
    • Number
    • 20423101520012
    • 虚拟账户流水编号

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    BillBookBillsGetRequest req = new BillBookBillsGetRequest();
    req.setFields("bid,account_id,journal_type,amount,book_time");
    req.setJournalTypes("1,2,3,4,5,6");
    req.setAccountId(20001021L);
    req.setEndTime(StringUtils.parseDateTime("2013-01-14 09:56:48"));
    req.setStartTime(StringUtils.parseDateTime("2013-01-14 10:05:25"));
    req.setPageNo(1L);
    req.setPageSize(40L);
    BillBookBillsGetResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <bill_book_bills_get_response>
        <has_next>false</has_next>
        <total_results>20</total_results>
        <bills>
            <book_bill>
                <amount>10000</amount>
                <journal_type>101</journal_type>
                <gmt_create>2013-01-13 04:47:12</gmt_create>
                <account_id>20001021</account_id>
                <description>可用金充值</description>
                <taobao_alipay_id>12345</taobao_alipay_id>
                <other_alipay_id>12345</other_alipay_id>
                <book_time>2013-01-13 04:47:12</book_time>
                <bid>20423101520012</bid>
            </book_bill>
        </bills>
    </bill_book_bills_get_response>

    异常示例

    • XML示例
    • JSON示例
    <error_response>
        <code>50</code>
        <msg>Remote service error</msg>
        <sub_code>isv.invalid-parameter</sub_code>
        <sub_msg>非法参数</sub_msg>
    </error_response>

    错误码解释

    错误码 错误描述 解决方案

    API工具

    如何获得此API

    FAQ

    返回
    顶部