Skip to main content
POST
Create a usage entry

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Body

Request serializer for creating a usage entry.

transaction_id
string
required

A unique identifier for this usage entry. Used to prevent duplicate entries and for later updates/deletes.

Maximum string length: 255
subscription_id
string<uuid>
required

The ID of the subscription this usage entry belongs to.

brick_id
string<uuid>
required

The ID of the metered brick this usage is for.

value
string<decimal>
required

The usage value to record (e.g., number of API calls, GB used).

Pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
time
string<date-time>
required

When the usage occurred, as an ISO 8601 date-time. Include the UTC offset, e.g. 2024-01-15T10:30:00Z or 2024-01-15T02:30:00-08:00; a value without one is read as UTC. The entry is stored in UTC. Its calendar date in the subscription's time zone decides which order of the subscription receives it (see the endpoint description).

count
string<decimal>

Deprecated: Use 'value' instead.

Pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
properties
any | null

Optional JSON object with additional properties for this usage entry.

Response

message
string
required

Success message indicating the usage entry was submitted.

warnings
object[]

Optional list of warnings, such as deprecation notices.