curl --request GET \
--url https://api.creem.io/v1/meters/{id}/consumed \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/meters/{id}/consumed"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/meters/{id}/consumed', 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://api.creem.io/v1/meters/{id}/consumed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.creem.io/v1/meters/{id}/consumed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.creem.io/v1/meters/{id}/consumed")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/meters/{id}/consumed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meter_id": "mtr_abc123",
"customer_id": "cust_abc123",
"units": "1280",
"period_start": "<string>",
"period_end": "<string>",
"updated_at": "<string>",
"as_of": "<string>"
}Get consumed units for a customer
How many units a customer has consumed through this meter in a billing period, alongside the period’s boundaries. Without at, this is an O(1) read of the current period’s projection — the number billing uses. With at, the units are replayed from the raw events as of that instant, within the billing period containing it, which is the right call for reconstructing what a customer had consumed at a past moment (an invoice date, a support question).
curl --request GET \
--url https://api.creem.io/v1/meters/{id}/consumed \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/meters/{id}/consumed"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/meters/{id}/consumed', 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://api.creem.io/v1/meters/{id}/consumed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://api.creem.io/v1/meters/{id}/consumed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.creem.io/v1/meters/{id}/consumed")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/meters/{id}/consumed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meter_id": "mtr_abc123",
"customer_id": "cust_abc123",
"units": "1280",
"period_start": "<string>",
"period_end": "<string>",
"updated_at": "<string>",
"as_of": "<string>"
}Authorizations
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Path Parameters
Query Parameters
The customer whose consumption is read
"cust_abc123"
ISO 8601 instant. When present, the consumption is replayed from the raw events as of that point in time, within the billing period that contains it. When absent, the current billing period’s projected total is returned.
"2026-08-15T00:00:00.000Z"
Response
Consumed units for the period
Meter ID
"mtr_abc123"
Customer ID
"cust_abc123"
Consumed units for the period, as a string for BigInt safety
"1280"
Start of the billing period (inclusive, ISO 8601)
End of the billing period (exclusive, ISO 8601)
When the projection was last advanced. Null when no usage has been folded into this period yet, and always null for an at= reply (which is replayed from raw events rather than read from the projection).
The point in time the units were replayed as of. Present only when at= was supplied.