Update a measurement
Authorizations
Value for the Authorization header parameter.
Path Parameters
Measurement identifier
Body
Measurements are used to define the amount of a unit that is used for the price calculation. SaaS Product Examples
- User: the amount of users that are allowed to use the software.
- Member: the amount of members that are allowed to use the software.
- Environment: the amount of environments that are allowed to use the software.
Hosting Examples
-
CPU: the amount of CPU cores that are used.
-
RAM: the amount of RAM that is used.
-
Storage: the amount of storage in GB that is used.
-
Traffic: the amount of traffic in GB that is used.
-
The aggregation type defines how the amount of units is calculated during a billing interval.
-
The unit defines what is measured.
The aggregation types are useful to be more flexible in the billing process. Imagine you sell a product with user seats, but you want to bill the customer for the maximum amount of users that were active during the billing interval. In this case you would use the aggregation type "max". If you want to bill the customer for the sum of all users that were active during the billing interval, you would use the aggregation type "sum". If you want to bill the customer for the average amount of users that were active during the billing interval, you would use the aggregation type "avg".
The aggregation type also depends how and when you push the measurements to the API. Feel free to contact us if you need help.
A unique code which can be used to identify the measurement.
1 - 255
A description of the measurement, which is shown in the summary of the usage data in the invoice.
255
Response
Measurements are used to define the amount of a unit that is used for the price calculation. SaaS Product Examples
- User: the amount of users that are allowed to use the software.
- Member: the amount of members that are allowed to use the software.
- Environment: the amount of environments that are allowed to use the software.
Hosting Examples
-
CPU: the amount of CPU cores that are used.
-
RAM: the amount of RAM that is used.
-
Storage: the amount of storage in GB that is used.
-
Traffic: the amount of traffic in GB that is used.
-
The aggregation type defines how the amount of units is calculated during a billing interval.
-
The unit defines what is measured.
The aggregation types are useful to be more flexible in the billing process. Imagine you sell a product with user seats, but you want to bill the customer for the maximum amount of users that were active during the billing interval. In this case you would use the aggregation type "max". If you want to bill the customer for the sum of all users that were active during the billing interval, you would use the aggregation type "sum". If you want to bill the customer for the average amount of users that were active during the billing interval, you would use the aggregation type "avg".
The aggregation type also depends how and when you push the measurements to the API. Feel free to contact us if you need help.
The unit of the measurement.
A unique code which can be used to identify the measurement.
1 - 255
A unique identifier for the measurement.
A description of the measurement, which is shown in the summary of the usage data in the invoice.
255
The aggregation type of the measurement. Describes how the quantity is calculated. This cannot be changed after creation, otherwise it would change the whole calculation for existing subscriptions.
Possible values:
count
: The number of sent measurements in the billing interval. Metered usage, which resets to 0 after each billing interval.count_unique
: The number of unique sent measurements in the billing interval, identified by the id given on event creation.max
: The maximum value of all sent measurements in the billing interval. Metered usage, which resets to 0 after each billing interval.sum
: The sum of all sent measurements in the billing interval.last_value
: The last sent measurement.average
: The average of all sent measurements in the billing interval.
count
, count_unique
, max
, sum
, average
, last_value
If set to false, the measurement will be billed for the whole billing interval, even if the quantity changes, or the item is cancelled / terminated during the billing interval.
The type of the measurement. This cannot be changed after creation, otherwise it would change the whole calculation for existing subscriptions.
Possible values:
instant_metered
: The measurement value is reset to 0 after each push. The measurement gets billed immediately and an invoice is created. The aggregation type must be "last_value".metered
: The measurement value is reset to 0 after each billing interval.recurring
: The measurement value is not reset to 0 after each billing interval and the last value is used for all following billing intervals. The aggregation type must be "last_value".
recurring
, metered
, instant_metered
Was this page helpful?