Skip to main content
GET
Get subscription usage

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

subscription_id
string<MeteroidId>
required

Subscription ID

Example:

"sub_7n42DGM5Tflk9n8mt7Fhc7"

Query Parameters

start_date
string<date>
end_date
string<date>
metric_id
string<MeteroidId>
Example:

"bm_7n42DGM5Tflk9n8mt7Fhc7"

Response

Subscription usage data

period_end
string<date>
required
period_start
string<date>
required
usage
object[]
required
computed_at
string<date-time> | null

Beta: when totals and the metrics' costs were computed. These are present only when a subscription's current billing period is read (no start_date nor end_date) and its usage could be priced.

totals
object[] | null

Beta: the sum of the metrics' costs, per currency or credit unit.