Required permission
Organisation > Admin > Billing > Read
Path parameters
invoiceId
string requiredID of the invoice
Query parameters
teamId
stringThe ID of the team to filter by. Not accepted from a token that can only read one team — a team billed in its own right, or a team token reading an org's billing — since those responses already cover that team and no other, and start at the project level without it.projectId
stringThe ID of the project to filter by.resourceType
stringThe resource type to filter by (e.g. service, job, harness, addon, volume).one ofjob, service, harness, addon, volumeremoveLegacyFields
booleanFor a billing entity temporarily receiving the legacy billing API contract, return the current contract instead. Use the current query parameters with this option.teamsPage
integerThe page number of teams to access.teamsPerPage
integerThe number of teams to return per page. Maximum of 100.projectsPage
integerThe page number of projects to access.projectsPerPage
integerThe number of projects to return per page. Maximum of 100.resourcesPage
integerThe page number of resources to access.resourcesPerPage
integerThe number of resources to return per page. Maximum of 100.
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredIdentifier for the invoice.period
{object} requiredstart
numberThe start of the billing period, as a Unix timestamp.end
numberThe end of the billing period, as a Unix timestamp.currency
stringThe currency code.status
stringThe invoice payment status, as reported by Stripe. `open` is finalized and awaiting payment — including while a payment is in flight or awaiting authentication — `uncollectible` has been written off, and `void` has been cancelled. `payment_failed` is only reported for invoices with no Stripe status to defer to.one ofdraft, open, payment_failed, paid, uncollectible, voidscope
{object}Present when the response is narrowed to the caller's own entity.entityType
stringThe entity the response is limited to.one ofteamentityId
stringIdentifier of that entity.paas
{object}price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberteams
[array] requiredAn array of teams with price and usage totals. Projects are included when a teamId, projectId or resourceType filter is applied. Resources are included when a projectId or resourceType filter is applied. Depth and the paged unit follow the active filters alone, never the number of teams, so an unfiltered response is always teams-only. The paged unit is reported as `pagination.unit`; page through it with that level's page parameters (e.g. `teamsPage`/`teamsPerPage`) until `pagination.hasNextPage` is false.- {object}
id
stringIdentifier for the team.name
stringThe name of the team.price
{object}The team's PaaS price. When a projectId or resourceType filter is applied, this reflects only the filtered slice (e.g. one project, or one resource type across the team).total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberprojects
[array]An array of projects for this team. Present when a teamId, projectId or resourceType filter is applied.- {object}
id
stringIdentifier for the project.name
stringThe name of the project.price
{object}The project's PaaS price. When a resourceType filter is applied, this reflects only that resource type's spend within the project.total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberresources
[array]Resources grouped by type. Present when a projectId or resourceType filter is applied.- {object}
resourceType
stringThe type of the resource (service, job, harness, addon, volume, etc.).price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberitems
[array]The resources of this type.- {object}
id
stringIdentifier for the resource.name
stringThe name of the resource.price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberduration
numberSeconds the resource was billed for.byoc
{object}price
{object}The customer-level BYOC price total. Always reflects the full customer total, regardless of drill-down filters.total
numberThe total BYOC price, rounded to 2 decimal places.vcpu
numberThe vCPU usage price.memory
numberThe memory usage price.gpuMemory
numberThe GPU memory usage price.cluster
numberThe cluster usage price.usage
{object}Customer-level BYOC usage hours.vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.clusterHours
numberCluster hours consumed.gpuMemoryGiBHours
numberGPU memory GiB-hours consumed.clusters
[array]Cluster-level BYOC usage and allocated spend. Present on invoice and hourly usage detail responses.- {object}
id
string requiredIdentifier for the cluster.name
stringThe cluster name.price
{object}Allocated BYOC spend for this cluster. The customer-level rate is apportioned by each resource component’s share of the customer total, so this is a reporting allocation rather than an independently billed cluster price. Its total is not rounded so all cluster totals remain reconcilable with the customer total.vcpu
numberThe vCPU usage price.memory
numberThe memory usage price.gpuMemory
numberThe GPU memory usage price.cluster
numberThe cluster usage price.total
numberThe allocated cluster BYOC price. Kept unrounded so cluster totals reconcile with the customer BYOC total.usage
{object}BYOC resource-hours consumed by this cluster.vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.clusterHours
numberCluster hours consumed.gpuMemoryGiBHours
numberGPU memory GiB-hours consumed.egressIp
{object}Egress IP spend for the period.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.loadBalancer
{object}Load balancer spend for the period.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.lineItems
[array]The billed lines of the invoice — metered PaaS and BYOC usage, plus the charges the spend categories cannot express: support, enterprise feature sets, infrastructure commitments, BYOC plan fees, log sinks, and any one-off charge. Egress IP and load balancer lines are omitted, being fully reported by their own categories.- {object}
title
stringWhat the line is for.base
numberThe charge before proration. Present only when a proration applies.proration
numberThe prorated adjustment, negative for unused time. Present only when a proration applies.total
numberThe cost of the line, including any proration.subTotal
numberThe subtotal before tax and discounts.discounts
{object}total
numberThe total discount amount.tax
{object}percent
numberThe tax percentage.amount
numberThe tax amount.total
numberThe total cost of the invoice, including tax.pagination
{object} requiredData about the endpoint pagination.hasNextPage
boolean requiredIs there another page of results available?cursor
stringThe cursor to access the next page of results.count
number requiredThe number of results returned by this request.unit
stringWhat this page counts.one ofteams, projects, resources, hours, days, months, total
GET /v1/billing/invoices/{invoiceId}
GET /v1/teams/{teamId}/billing/invoices/{invoiceId}
Example response
200 OK
JSON
{
"data": {
"currency": "usd",
"status": "paid",
"paas": {
"price": {
"total": 69.22
},
"teams": [
{
"price": {
"total": 69.22
},
"projects": [
{
"price": {
"total": 69.22
},
"resources": [
{
"price": {
"total": 69.22
},
"items": [
{
"price": {
"total": 69.22
}
}
]
}
]
}
]
}
]
},
"lineItems": [
{
"title": "Infrastructure Commitment"
}
]
},
"pagination": {
"hasNextPage": false,
"count": 1,
"unit": "days"
}
}