查询账单列表
GET/api/v1/invoices
- 成功码
60900- 子账号所需权限
- 查看费用
查询账单(周期续费账单、按量账单、手工账单、模型服务账单等),每条都带明细 items。
找待支付的续费账单:invoice_type=1 且 status=0(待支付)或 2(逾期),应付金额看 payable_amount。
按需账单出账时自动从余额扣款,余额不够也会扣(现金账户变为负数)、账单照常为已支付;只有现金账户被冻结或关闭时才会留成待支付。
请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
page | 查询 | integer | 是 | 页码,从 1 开始 |
limit | 查询 | integer | 是 | 每页条数 |
invoice_type | 查询 | integer | 否 | 按账单类型筛选:1 周期续费 / 2 按量 / 3 手工(其他费用) / 4 模型服务 / 5 IP 属地查询 / 6 主机安全高级版 / 7 流量包 / 8 域名 / 9 企业邮箱 |
status | 查询 | integer | 否 | 按状态筛选:0 待支付 / 1 已支付 / 2 逾期 / 3 已作废 |
start_time | 查询 | string | 否 | 创建时间起(含)。支持 YYYY-MM-DD(当天 00:00:00)、YYYY-MM-DD HH:mm:ss、RFC3339;无法解析的写法视为未传 |
end_time | 查询 | string | 否 | 创建时间止。只给日期 YYYY-MM-DD 时包含当天整天;给到秒时包含该时刻;无法解析的写法视为未传 |
应答 data
| 字段 | 类型 | 说明 |
|---|---|---|
list | array<object> | 账单列表,字段同「查询账单详情」 |
list[].id | integer | 账单 ID |
list[].invoice_no | string | 账单编号 |
list[].invoice_type | integer | 1 周期续费 / 2 按量 / 3 手工 / 4 模型服务 / 5 IP 属地查询 / 6 主机安全高级版 / 7 流量包 / 8 域名 / 9 企业邮箱;无法识别为 0 |
list[].status | integer | 0 待支付 / 1 已支付 / 2 逾期 / 3 已作废 |
list[].payable_amount | string | 当前应付(元) |
list[].due_date | string | 到期日 |
list[].items | array<object> | 账单明细 |
count | integer | 符合条件的总条数(用于分页) |
应答示例(data)
{
"list": [
{
"id": 3001,
"invoice_no": "INV20261020-0008",
"username": "demo",
"invoice_type": 1,
"billing_period_start": "2026-10-25 10:00:00",
"billing_period_end": "2026-11-25 10:00:00",
"total_amount": "99.00",
"discount_amount": "",
"adjustment_amount": "0.00",
"payable_amount": "99.00",
"paid_amount": "0.00",
"currency": "CNY",
"status": 0,
"due_date": "2026-10-25 10:00:00",
"paid_at": "",
"remark": "",
"extra": null,
"items": [
{
"id": 6001,
"invoice_id": 3001,
"service_instance_id": 583920174652,
"service_instance_name": "web-01",
"product_id": 12,
"product_name": "云服务器 通用型",
"description": "续费 web-01(1 个月)",
"quantity": "1.0000",
"unit_price": "99.00",
"amount": "99.00",
"discount_amount": "",
"subtotal": "99.00",
"extra": null,
"created_at": "2026-10-18 02:00:00",
"unit": "cycle",
"billing_type": "prepaid_recurring"
}
],
"created_at": "2026-10-18 02:00:00",
"updated_at": "2026-10-18 02:00:00"
}
],
"count": 5
}