Event Metering

Meter an event

post/v2/events

Request

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"
}

Changes

    • breaking

      the request property became required

    • breaking

      the request property type changed from object to string

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      the request property default value UNKNOWN was removed

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the required property to the response with the status

    • breaking

      the request property type changed from string to object

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      the request property default value UNKNOWN was added

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status