Invoice
A customer invoice, its line items always preloaded alongside it. Only ever seen by clients as issued, paid, or void — draft is an internal-only status used while a platform admin is preparing the invoice, and is filtered out before it reaches the organization-facing endpoints.
ISO 4217 currency code the invoice's amounts are denominated in.
Lifecycle status. The underlying model also has a draft status, but drafts are never returned by the organization-facing endpoints.
Possible values: [issued, paid, void]
Total invoice amount in billingCurrency.
When the invoice was issued, null while still a draft.
Net-term payment due date, stamped on issuance.
When the invoice was marked paid, null until then.
lines object[]
Which kind of billable thing this line covers; subjectRef names the specific one.
Possible values: [dataset, endpoint, model]
ID of the specific dataset, endpoint, or AI model this line covers.
Rate applied per unit, in the invoice's billing currency.
Line amount in the invoice's billing currency (quantity * ratePerUnit, currency-converted from nativeAmount where applicable).
Line amount in its original native currency, before conversion to the invoice's billing currency.
ISO 4217 currency code nativeAmount is denominated in.
ID of the rate-catalog entry applied to this line, null if none was applied.
Free-form JSON pointing back to the usage records this line was generated from.
{
"id": 0,
"organizationId": 0,
"billingCurrency": "string",
"status": "issued",
"totalAmount": 0,
"periodStart": "2024-07-29T15:51:28.071Z",
"periodEnd": "2024-07-29T15:51:28.071Z",
"issuedAt": "2024-07-29T15:51:28.071Z",
"dueAt": "2024-07-29T15:51:28.071Z",
"paidAt": "2024-07-29T15:51:28.071Z",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"lines": [
{
"id": 0,
"invoiceId": 0,
"subjectKind": "dataset",
"subjectRef": "string",
"description": "string",
"quantity": 0,
"unit": "string",
"ratePerUnit": 0,
"amount": 0,
"nativeAmount": 0,
"nativeCurrency": "string",
"appliedRateId": 0,
"sourceRefs": "Unknown Type: object,null",
"createdAt": "2024-07-29T15:51:28.071Z"
}
]
}