基本 URL: https://cloud.mongodb.com/api/public/v1.0
Resource
GET /orgs/{ORG-ID}/invoices/请求路径参数
名称 | 类型 | 说明 |
|---|---|---|
| 字符串 | 组织的唯一标识符。 |
请求查询参数
以下查询参数为可选参数:
名称 | 类型 | 必要性 | 说明 | 默认 |
|---|---|---|---|---|
pageNum | 数字 | Optional | 从一开始的整数,用于返回结果的一部分。 |
|
itemsPerPage | 数字 | Optional | 每页要返回的项目数,最多 500 个。 |
|
pretty | 布尔 | Optional |
| |
envelope | 布尔 | Optional | 指示是否将响应包装在信封中的标志。 某些 API 客户端无法访问 HTTP 响应标头或状态代码。要修复此问题,在查询中设置 对于返回结果列表的端点, |
|
backupJobsEnabledOnly | 布尔 | Optional | 指示是否从响应中排除未启用备份数据库的守护进程的标志。 将其设置为 |
|
请求正文参数
此端点不使用 HTTP 请求正文参数。
响应
result大量中的每个文档代表一张发票。 费用通常在第二天公布。
名称 | 类型 | 说明 |
|---|---|---|
| 数字 | 此发票中的账单金额,计算公式为 |
| 数字 | 为此发票支付的金额,以美分为单位。 |
| 字符串 | Timestamp in International Organization for Standardization (ISO) 8601 date and time format in UTC when this invoice was created. |
| 数字 | MongoDB 存入的金额,以美分为单位。 |
| 字符串 | Timestamp in ISO 8601 date and time format in UTC when the billing period for this invoice ended. |
| 字符串 | 此发票的唯一标识符。 |
| 对象数组 | 指向子资源和/或相关资源的一个或多个链接。URL 之间的关系类型在 Web 链接规范 中进行了解释。 |
| 字符串 | 与此发票关联的项目的唯一标识符。不会在所有发票中出现。 |
| 字符串 | 收到此发票的组织的唯一标识符。 |
| 数字 | 应用于 subtotalCents 的税金数量。 |
| 字符串 | Timestamp in ISO 8601 date and time format in UTC of the starting date for this invoice. |
| 字符串 | 此发票的状态。 接受的值为:
|
| 数字 | 所有正发票行项目的总和(以美元美分为单位)。 |
| 字符串 | Timestamp in ISO 8601 date and time format in UTC when the invoice was last updated. |
请求示例
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --include \ --request GET "https://cloud.mongodb.com/api/public/v1.0/orgs/{ORG-ID}/invoices/?pretty=true"响应示例
{ "links" : [ { "href" : "https://cloud.mongodb.com/api/public/v1.0/orgs/{ORG-ID}/invoices/?pretty=true&pageNum=1&itemsPerPage=100", "rel" : "self" } ], "results" : [ { "amountBilledCents" : 0, "amountPaidCents" : 0, "created" : "2018-06-01T04:05:10Z", "endDate" : "2018-07-01T00:00:00Z", "id" : "{INVOICE-ID}", "links" : [ { "href" : "https://cloud.mongodb.com/api/public/v1.0/orgs/{ORG-ID}/invoices/{INVOICE-ID}", "rel" : "self" } ], "orgId" : "{ORG-ID}", "salesTaxCents" : 0, "startDate" : "2018-06-01T00:00:00Z", "startingBalanceCents" : 0, "statusName" : "PENDING", "subtotalCents" : 0, "updated" : "2018-06-01T04:05:10Z" }, { "amountBilledCents" : 726, "amountPaidCents" : 726, "created" : "2018-02-01T06:05:04Z", "endDate" : "2018-03-01T00:00:00Z", "id" : "{INVOICE-ID}", "links" : [ { "href" : "https://cloud.mongodb.com/api/public/v1.0/orgs/{ORG-ID}/invoices/{INVOICE-ID}", "rel" : "self" } ], "orgId" : "{ORG-ID}", "salesTaxCents" : 57, "startDate" : "2018-02-01T00:00:00Z", "startingBalanceCents" : 0, "statusName" : "PAID", "subtotalCents" : 669, "updated" : "2018-03-01T07:00:54Z" } ], "totalCount" : 16}