对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

获取一个组织的所有发票

基本 URL: https://cloud.mongodb.com/api/public/v1.0

GET /orgs/{ORG-ID}/invoices/
名称
类型
说明

ORG-ID

字符串

组织的唯一标识符。

以下查询参数为可选参数:

名称
类型
必要性
说明
默认

pageNum

数字

Optional

从一开始的整数,用于返回结果的一部分。

1

itemsPerPage

数字

Optional

每页要返回的项目数,最多 500 个。

100

pretty

布尔

Optional

false

envelope

布尔

Optional

指示是否将响应包装在信封中的标志。

某些 API 客户端无法访问 HTTP 响应标头或状态代码。要修复此问题,在查询中设置 envelope : true。

对于返回结果列表的端点,content 对象是一个信封。Cloud Manager 将 status 字段添加到响应正文。

false

backupJobsEnabledOnly

布尔

Optional

指示是否从响应中排除未启用备份数据库的守护进程的标志。 将其设置为false以包含将backupJobsEnabled标志设置为false的守护进程配置。

true

此端点不使用 HTTP 请求正文参数。

result大量中的每个文档代表一张发票。 费用通常在第二天公布。

名称
类型
说明

amountBilledCents

数字

此发票中的账单金额,计算公式为subtotalCents + salesTaxCents - startingBalanceCents 。

amountPaidCents

数字

为此发票支付的金额,以美分为单位。

created

字符串

Timestamp in International Organization for Standardization (ISO) 8601 date and time format in UTC when this invoice was created.

creditsCents

数字

MongoDB 存入的金额,以美分为单位。

endDate

字符串

Timestamp in ISO 8601 date and time format in UTC when the billing period for this invoice ended.

id

字符串

此发票的唯一标识符。

links

对象数组

指向子资源和/或相关资源的一个或多个链接。URL 之间的关系类型在 Web 链接规范 中进行了解释。

groupId

字符串

与此发票关联的项目的唯一标识符。不会在所有发票中出现。

orgId

字符串

收到此发票的组织的唯一标识符。

salesTaxCents

数字

应用于 subtotalCents 的税金数量。

startDate

字符串

Timestamp in ISO 8601 date and time format in UTC of the starting date for this invoice.

statusName

字符串

此发票的状态。 接受的值为:

  • CLOSED: 订阅周期的所有费用均已确定,余额大于零,且尚未向客户数收费。

  • FAILED: 从信用卡扣款应付金额失败。

  • FORGIVEN: 已向客户数收取费用,但该费用已被免除。

  • FREE: 结果金额为零,因此客户数无需付费。

  • PAID: 资金已转移至 MongoDB, Inc.

  • PENDING: 包括当前订阅周期的费用。一个客户在这种状态下不应拥有多张发票。

  • PREPAID: 客户数使用的是预付费套餐,因此不会向客户数收费。

subtotalCents

数字

所有正发票行项目的总和(以美元美分为单位)。

updated

字符串

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}