charges
Creates, updates, deletes, gets or lists a charges resource.
Overview
| Name | charges |
| Type | Resource |
| Id | vercel.billing.charges |
Fields
The following fields are returned by SELECT queries:
- list
Wrapper for non-JSON response bodies (jsonl, ndjson, streamed json, octet-stream): one row carrying the raw body text.
| Name | Datatype | Description |
|---|---|---|
contents | string | Raw response body. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | from, to | team_id, slug | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
from | string | Inclusive start of the date range as an ISO 8601 date-time string in UTC. |
to | string | Exclusive end of the date range as an ISO 8601 date-time string in UTC. |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- list
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 }}'
;