Metering

The Metering API enables partners to send usage data for consolidated usage-based billing.

Read more


Other Operations

metering-transaction

Apply metering transaction

POST /metering:apply

Submit usage metering for the given organization. The API accepts a set of usage entries. Each entry represents a product, its variable and a metering value. The value might be negative or decimal (up to five decimal places). Sample payload:

{
  'usage': [
    {
      'product': 'partner',
      'variable': 'license_product',
      'quantity': 3.1415
    },
    {
      'product': 'partner',
      'variable': 'commission',
      'quantity': -42.00005
    }
  ],
  'organization': 'bf9bbc88-71ea-407c-9920-fc1101d86183'
}

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
organizationstringnoTarget Org
usagearray[object]noUsage data schema details
Example
{
  "organization": "string",
  "usage": [
    {
      "product": "string",
      "quantity": 0,
      "variable": "string"
    }
  ]
}

Responses

Status: 204 - 204

Content-Type: application/json

PropertyTypeDescription
okboolean
Example output
{
  "ok": true
}

SDK reference for metering-transaction: golang | Python | Java

CLI: exo api metering-transaction

Last updated on