Get Summary
Returns a billing period’s statement as a sum: meteredCostCents, the period’s usage at the account’s rates with a breakdown by meter; adjustments, the lines the plan applies (the included credits taken off, the base price added); and billedCostCents, what they come to, which is what the period invoices or would if it ended now. Also the account’s standing on the plan’s credit pool and, for the current period, a projection to its end at the recent daily pace. A past period’s lines are read from the invoices issued for it. The only billing route where the plan’s base price and included credits enter. Money is in integer cents. On a plan that prices no usage, priced is false and the amounts are zero.
curl --request GET \
--url https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"priced": true,
"currency": "<string>",
"billingPeriod": {
"start": 123,
"end": 123
},
"plan": {
"id": "<string>",
"basePriceCents": 123,
"includedCredits": 123,
"overagePricePerCreditCents": 123
},
"meteredCostCents": 123,
"meteredCostBreakdown": {},
"adjustments": [
{
"type": "included_credits",
"name": "<string>",
"amountCents": 123
}
],
"billedCostCents": 123,
"credit": {
"granted": 123,
"used": 123,
"remaining": 123
},
"projected": {
"meteredCostCents": 123,
"billedCostCents": 123,
"dailyRateCents": 123,
"paceStart": 123,
"paceEnd": 123,
"daysRemaining": 123
},
"invoices": [
{
"id": "<string>",
"status": "<string>",
"hostedInvoiceUrl": "<string>"
}
]
}
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}Authorizations
Archil API key, including its key- prefix
Query Parameters
Which billing period: current (the default), or a YYYY-MM-DD date (UTC) inside a past period that has been invoiced; the day a period starts on selects it. A past period is read whole from the invoices issued for it, named in invoices: its metered quantities and cost as billed, the included credits taken off, the base price, and any other line under its own name.
"2026-09-20"
Was this page helpful?
curl --request GET \
--url https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.green.us-east-1.aws.prod.archil.com/api/billing/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"priced": true,
"currency": "<string>",
"billingPeriod": {
"start": 123,
"end": 123
},
"plan": {
"id": "<string>",
"basePriceCents": 123,
"includedCredits": 123,
"overagePricePerCreditCents": 123
},
"meteredCostCents": 123,
"meteredCostBreakdown": {},
"adjustments": [
{
"type": "included_credits",
"name": "<string>",
"amountCents": 123
}
],
"billedCostCents": 123,
"credit": {
"granted": 123,
"used": 123,
"remaining": 123
},
"projected": {
"meteredCostCents": 123,
"billedCostCents": 123,
"dailyRateCents": 123,
"paceStart": 123,
"paceEnd": 123,
"daysRemaining": 123
},
"invoices": [
{
"id": "<string>",
"status": "<string>",
"hostedInvoiceUrl": "<string>"
}
]
}
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}{
"success": false,
"error": "Invalid request parameters",
"code": "<string>"
}