Zum Hauptinhalt springen
GET
/
meters
/
{id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const meter = await client.meters.retrieve('id');

console.log(meter.id);
{
  "aggregation": {
    "type": "count",
    "key": "<string>"
  },
  "business_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "event_name": "<string>",
  "id": "<string>",
  "measurement_unit": "<string>",
  "name": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "filter": "<unknown>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Meter ID

Response

Meter details

aggregation
Meter Aggregation · object
required
business_id
string
required
created_at
string<date-time>
required
event_name
string
required
id
string
required
measurement_unit
string
required
name
string
required
updated_at
string<date-time>
required
description
string | null
filter
Meter Filter · object

A filter structure that combines multiple conditions with logical conjunctions (AND/OR).

Supports up to 3 levels of nesting to create complex filter expressions. Each filter has a conjunction (and/or) and clauses that can be either direct conditions or nested filters.

Example:
{
"clauses": [
{
"key": "user_id",
"operator": "equals",
"value": "user123"
},
{
"key": "amount",
"operator": "greater_than",
"value": 100
}
],
"conjunction": "and"
}