List FOCUS billing charges
GET
/__remote/api.vercel.com/v1/billing/chargesReturns the billing charge data in FOCUS v1.3 JSONL format for a specified Edgenivo team, within a date range specified by
from and to query parameters. Supports 1-day granularity with a maximum date range of 1 year. The response is streamed as newline-delimited JSON (JSONL) and can be optionally compressed with gzip if the Accept-Encoding: gzip header is provided. SkuId is the stable product ID. For unmapped items, it is derived from the item identifier. SubAccountId and SubAccountName are the team. With orgId instead of a team, returns a row per team and product in an organization with Enterprise teams, plus Organization (unallocated) rows for spend no single team used; this requires the OrgAdmin or OrgViewer role. A team in such an organization, including the one that holds its subscription, gets only its own rows. Those rows are not split by region or project, and x_CostAttribution marks how cost was split between teams. This is only available for Owner, Member, Developer, Security, Billing, and Enterprise Viewer roles for the supplied team.Request
curl -N --request GET \ --url '/__remote/api.vercel.com/v1/billing/charges?teamId=<team>&from=<from_date>&to=<to_date>' \ --header 'Authorization: Bearer <token>' \ --header 'Accept-Encoding: gzip' \ --compressed
Response
{ "BilledCost": "123", "BillingCurrency": "USD", "ChargeCategory": "Adjustment", "ChargePeriodEnd": "string", "ChargePeriodStart": "string", "ConsumedQuantity": "1", "ConsumedUnit": "units", "EffectiveCost": "123", "PricingCategory": "Committed", "PricingCurrency": "USD", "PricingQuantity": "1", "PricingUnit": "units", "RegionId": "example_id", "RegionName": "Example Name", "ServiceCategory": "AI and Machine Learning", "ServiceName": "Example Name", "ServiceProviderName": "Example Name", "SkuId": "example_id", "SkuPriceId": "100.00", "SubAccountId": "example_id", "SubAccountName": "Example Name", "SubAccountType": "Team", "Tags": "value", "x_CostAttribution": "calibrated_estimate"}AuthorizationbearerToken
Default authentication mechanism
The Organization identifier. Returns charges for every team in the organization, split by team, instead of a single team. Cannot be combined with
teamId or slug. Requires the OrgAdmin or OrgViewer role.200Success
Classification of the charge.
Usage for measured consumption; Purchase for flat-fee or licensed charges without a consumption unit.Volume of resource consumed. Null when ChargeCategory is not
Usage; always paired with a non-null ConsumedUnit.Unit of measurement for consumed quantity. Null when the charge is not measured in units.
Amortized cost representation including discounts, pre-commitment credit purchase amount, etc.
Identifier for the price applied to the charge. Equal to
SkuId, which FOCUS allows.Edgenivo team the charge belongs to. Null on an org root's Organization (unallocated) rows, which no single team used.
How the row's cost was split between teams.
uncalibrated_estimate divides billed usage by each team's usage share; calibrated_estimate also scales each team to its rated cycle subtotal. Null on rows not split between teams. Product and day totals are billed amounts either way.400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
500Error
503Error