Skip to main content
POST
Activate usage meter

Authorizations

Authorization
string
header
required

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

Path Parameters

usage_meter_id
string
required
Maximum string length: 50
Example:

"um.1zYnCiM9Bpg.1zYn"

Response

Response for Create and Get usage event requests

Structure of usage meter

id
string
required

Identifier of the usage meter

Maximum string length: 20
name
string
required

Name of the usage meter

Maximum string length: 50
Pattern: ^[\sa-zA-Z0-9_-]*$
Example:

"rides-usage"

displayName
string
required

Display name of usage meter. This is an auto-generated field which contains billableName of usage meter. If billableName is not provided, name will be used as display name.

Maximum string length: 255
type
enum<string>
required

Type of usage meter

Available options:
COUNTER
Example:

"COUNTER"

aggregation
enum<string>
required

Aggregation to be applied on usage meter result

  • COUNT - Counts number of events matching the usage meter
  • SUM - Sums up results of computation of all events matching usage meter
Available options:
COUNT,
SUM
billableName
string

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

Maximum string length: 255
Example:

"Rides Usage"

description
string
Maximum string length: 255
Example:

"Meter to track cab rides"

filters
object[]
status
enum<string>

Status of usage meter

Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
Example:

"DRAFT"

computations
object[]
Maximum array length: 1
eventSchema
object

Structure of an event schema

createdAt
string<date-time>
lastActivatedAt
string<date-time>
updatedAt
string<date-time>