Skip to main content

charges

Creates, updates, deletes, gets or lists a charges resource.

Overview​

Namecharges
TypeResource
Idvercel.billing.charges

Fields​

The following fields are returned by SELECT queries:

Wrapper for non-JSON response bodies (jsonl, ndjson, streamed json, octet-stream): one row carrying the raw body text.

NameDatatypeDescription
contentsstringRaw response body.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfrom, toteam_id, slugReturns the billing charge data in FOCUS v1.3 JSONL format for a specified Vercel 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. This is only available for Owner, Member, Developer, Security, Billing, and Enterprise Viewer roles for the supplied team.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
fromstringInclusive start of the date range as an ISO 8601 date-time string in UTC.
tostringExclusive end of the date range as an ISO 8601 date-time string in UTC.
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples​

Returns the billing charge data in FOCUS v1.3 JSONL format for a specified Vercel 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. This is only available for Owner, Member, Developer, Security, Billing, and Enterprise Viewer roles for the supplied team.

SELECT
contents
FROM vercel.billing.charges
WHERE from = '{{ from }}' -- required
AND to = '{{ to }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;