query · Module: Billing · Requires billing:read
Arguments
Returns
Meter!
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
query Meter($id: ID!) {
meter(id: $id) {
id
object
name
status
livemode
created
updated
key
source {
event
reported
}
aggregation
value_path
unit
}
}
{
"id": "mtr_1a2B3c"
}
{
"data": {
"meter": {
"id": "mtr_1a2B3c",
"object": "meter",
"name": "Example",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"key": "signature",
"source": {
"event": "example",
"reported": true
},
"aggregation": "count",
"value_path": "example",
"unit": "kg"
}
}
}
Retrieve a Meter
query Meter($id: ID!) {
meter(id: $id) {
id
object
name
status
livemode
created
updated
key
source {
event
reported
}
aggregation
value_path
unit
}
}
{
"id": "mtr_1a2B3c"
}
{
"data": {
"meter": {
"id": "mtr_1a2B3c",
"object": "meter",
"name": "Example",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"key": "signature",
"source": {
"event": "example",
"reported": true
},
"aggregation": "count",
"value_path": "example",
"unit": "kg"
}
}
}
query · Module: Billing · Requires billing:read
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
Meter!
| Field | Type |
|---|---|
id | String! |
object | MeterObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
key | String! |
name | String |
source | MeterSource! |
aggregation | MeterAggregation! |
value_path | String |
filters | JSON |
unit | String |
status | MeterStatus |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
errors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Meter($id: ID!) {
meter(id: $id) {
id
object
name
status
livemode
created
updated
key
source {
event
reported
}
aggregation
value_path
unit
}
}
{
"id": "mtr_1a2B3c"
}
{
"data": {
"meter": {
"id": "mtr_1a2B3c",
"object": "meter",
"name": "Example",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"key": "signature",
"source": {
"event": "example",
"reported": true
},
"aggregation": "count",
"value_path": "example",
"unit": "kg"
}
}
}