GET
/
usage_meters
/
{usage_meter_id}
curl --request GET \
  --url https://api.togai.com/usage_meters/{usage_meter_id} \
  --header 'Authorization: <authorization>'
{
  "id": "um.1zlQTBWlkeO.lB7fh",
  "name": "Rides",
  "description": "Cab rides",
  "type": "COUNTER",
  "aggregation": "COUNT",
  "status": "DRAFT",
  "computations": [
    {
      "matcher": "{\n  \"and\": [\n    {\"in\": [{\"var\": \"dimension.city\"}, \"chennai\", \"mumbai\"]},\n    \"or\": [\n      {\">\": [{\"var\": \"attribute.distance\"}, 100]},\n      {\"<\": [{\"var\": \"attribute.distance\"}, 20]}\n    ]\n  ]\n}\n",
      "computation": "1"
    }
  ]
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

usage_meter_id
string
required

Response

200 - application/json
id
string
required

Identifier of the usage meter

name
string
required

Name of the usage meter

billableName
string

Billable name of addon. Billable name takes precedence over name to display in invoice.

description
string
type
enum<string>
required

Type of usage meter

Available options:
COUNTER
status
enum<string>

Status of usage meter

Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
aggregation
enum<string>
required

Aggregation to be applied on usage meter result

Available options:
COUNT,
SUM
computations
object[]
createdAt
string
lastActivatedAt
string
updatedAt
string