Skip to content

Calculate team billing costs

GET
/teams/{teamId}/billing/cost

Calculate costs for a team over a specified billing period. Requires team admin role.

teamId
required

Team ID

string

Team ID

startDate
required

Start of the billing period (inclusive)

string format: date-time

Start of the billing period (inclusive)

endDate
required

End of the billing period (exclusive)

string format: date-time

End of the billing period (exclusive)

pricingSheetId

Optional pricing sheet ID (defaults to most recent effective)

string

Optional pricing sheet ID (defaults to most recent effective)

Cost calculation successful

object
teamId
required

Team ID

string
pricingSheetId
required

Pricing sheet ID used for calculation

string
startDate
required

Start of billing period (inclusive)

string format: date-time
endDate
required

End of billing period (exclusive)

string format: date-time
operationCosts
required

Cost breakdown by operation type

Array<object>
object
operationType
required

Operation type

string
dimensions
required

Cost breakdown by dimension

Array<object>
object
dimension
required

Cost dimension name

string
units
required

Number of units consumed

number
unitPriceNanodollars
required

Price per unit in nanodollars

number
costNanodollars
required

Total cost for this dimension in nanodollars

number
costUsd
required

Total cost for this dimension in USD

number
pricingRuleId
required

Pricing rule ID used for calculation

string
totalCostNanodollars
required

Total cost for this operation in nanodollars

number
totalCostUsd
required

Total cost for this operation in USD

number
totalCostNanodollars
required

Total cost for all operations in nanodollars

number
totalCostUsd
required

Total cost for all operations in USD

number
usageRecordCount
required

Number of usage records included in calculation

number
calculatedAt
required

Timestamp when calculation was performed

string format: date-time

Bad Request - Validation error or invalid input

object
error
required
string
code
string
details
nullable
retryable
boolean

Unauthorized - Authentication required or invalid token

object
error
required
string
code
string
details
nullable
retryable
boolean

Forbidden - Insufficient permissions

object
error
required
string
code
string
details
nullable
retryable
boolean

Not Found - Resource does not exist

object
error
required
string
code
string
details
nullable
retryable
boolean