v47

latestOpenAPI 3.1.0raw.githubusercontent.com2025-11-064829.2 KB
Event Metering

Meter an event

Meter an event

post/v2/events

Request body

transactionIdstring required

The unique identifier of the metering event

payloadstring required

The rating payload as a JSON object. For example, if you are sending key value pairs of 'requestTokens' and 'responseTokens' with values of '1' and '2' respectively, the payload would be { "requestTokens": "1", "responseTokens": "2"}. If these keys do not already exist in Revenium, each key you send will be configured as a metering element on the relevant data source.

sourceIdstring

the sourceId

subscriberCredentialIdstring

The unique identifier of the credential

sourceType'UNKNOWN' | 'AI' | 'SDK_PYTHON' | 'SDK_JS' | 'SDK_JVM' | 'SDK_SPRING' | 'SDK_DOTNET' | 'SDK_GOLANG' | 'SDK_RUST' | 'EBPF' | 'AWS' | 'AZURE' | 'SNOWFLAKE' | 'KONG' | 'GRAVITEE' | 'MULESOFT' | 'BOOMI' | 'REVENIUM' | 'INTERNAL' required

the source type

Example request

{
  "transactionId": "123e4567-e89b-12d3-a456-426614174000",
  "subscriberCredentialId": "The credential associated with the event.  Visible on the subscriber credentials in page in the Revenium platform."
}

Response

API response successfully metered

objectstring required

Type of the object, typically 'metering'

labelstring required

A descriptive label for the metering response

createdstring

ISO8601 formatted timestamp when the response was created

updatedstring

ISO8601 formatted timestamp when the response was last updated

idstring required

Unique identifier for the metering response

signaturestring required

Signature used for validating the response data

_linksLinks

Example response

{
  "object": "metering",
  "label": "Metering Response",
  "created": "2025-03-02T15:04:05Z",
  "updated": "2025-03-02T15:04:06Z",
  "id": "abc123",
  "signature": "signature123"
}