Monthly spend and purchase summary for this project
const url = 'https://zkao.io/api/v1/projects/example/billing/summary';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://zkao.io/api/v1/projects/example/billing/summary \ --header 'Authorization: Bearer <token>'Requires scope: read. Per-month net scan spend and net purchases attributed to this project, in credits, newest first. Purchases land in the organization’s shared balance.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “ Responses ”OK
object
The organization whose shared balance the purchases were made into.
object
URL segment of the organization (/orgs/<slug>), unique across zkao.
object
YYYY-MM (UTC).
Net scan spend (deductions less refunds), in credits.
Net purchases (purchases less clawbacks), in credits.
Examplegenerated
{ "organization": { "id": "example", "slug": "example", "name": "example" }, "months": [ { "month": "example", "spentCredits": 1, "purchasedCredits": 1 } ]}Missing, malformed, expired, or revoked token
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}