GET /openapi/memorylake/admin/v1/billing/invoices
所需权限:
invoice:read查询参数
array
可重复。仅返回处于这些状态的发票
integer
默认值:"20"
每页条数(1–100)
string
上一页返回的令牌
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/invoices' \
-H 'Authorization: Bearer sk_xxxxxx'
响应
object
显示 Load More Response Billing Invoice 对象
显示 Load More Response Billing Invoice 对象
array
当前页的条目列表
显示 Billing Invoice 对象
显示 Billing Invoice 对象
integer
签发时间,Unix 秒级时间戳
string
支付服务商托管的发票页面;没有时为 null
string
发票 ID
string
支付服务商自身的 PDF 链接;服务商尚未提供时为 null。GET /billing/invoices/{invoice_id}/pdf 始终在本 API 内直接返回 PDF
string
票面上印制的发票号码
string
其所属的订单(GET /billing/orders/{order_id});没有时为 null
string
发票状态。可选值:
draft、open、paid、uncollectible、void。integer
付款截止时间,Unix 秒级时间戳
string
用于获取下一页的令牌;最后一页不返回
integer
所有分页中符合筛选条件的条目总数;无法获取计数时省略
{
"success": true,
"message": "Operation completed successfully",
"data": {
"items": [
{
"created_at": 1760000000,
"hosted_invoice_url": "https://example.com/hosted_invoice",
"invoice_id": "fc9ec77f14773109fc1b0f8a2749731e",
"invoice_pdf_url": "https://example.com/invoice_pdf",
"number": "example",
"order_id": "98fae70aa1ad919811f9214706e755e1",
"status": "draft",
"subtotal": {
"amount": 1999,
"currency": "usd"
},
"tax": {
"amount": 1999,
"currency": "usd"
},
"total": {
"amount": 1999,
"currency": "usd"
},
"due_at": 1760000000
}
],
"continuation_token": "eyJvZmZzZXQiOjIwfQ",
"total": 1
}
}
错误
出错时返回success: false、message 和 error_code。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
400 | 参数或请求体无效 |
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
422 | 请求体或参数未通过校验 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |