Listar consumos aceites
RegistosGET /consumptions
List immutable consumption records selected from accepted readings
Returns the tenant's stored consumption records, one cursor page at a time. Each record covers one meter and billing cycle, references the accepted readings it was computed from, and states whether it is actual or estimated. Requires business:consumptions:read; an unknown method value or an invalid cursor returns 400.
Parâmetros
limitMaximum resources to return (default 20, maximum 100).
afterOpaque cursor returned by the previous page.
meter_idReturn only consumptions computed for this meter ID.
account_idReturn only consumptions belonging to this account ID (the account the meter was assigned to when the consumption was recorded).
cycle_idReturn only consumptions recorded for this billing cycle identifier.
methodReturn only consumptions of this kind: actual when both readings were actual, estimated when either reading was estimated; empty returns both.
um de
actual,estimated
Devolve
200 Consumption records with selected reading IDs preserved
Permissões business:consumptions:read · Funções: admin, analyst, billing_clerk, customer_service, field_supervisor, finance, operations, owner, viewer
curl -X GET "$BUSINESS_API/consumptions" \
-H "Authorization: Bearer sk_test_..."
# Sem comando CLI equivalente; use cURL ou HTTP directo.
const res = await fetch("$BUSINESS_API/consumptions", {
method: "GET",
headers: {
Authorization: "Bearer sk_test_..."
}
});
const data = await res.json();
import requests
res = requests.get(
"$BUSINESS_API/consumptions",
headers={
"Authorization": "Bearer sk_test_..."
}
)
data = res.json()
req, _ := http.NewRequest("GET", "$BUSINESS_API/consumptions", nil)
req.Header.Set("Authorization", "Bearer sk_test_...")
resp, err := http.DefaultClient.Do(req)
Consumption records with selected reading IDs preserved