write_metering
write_metering
Live server: test server (test.mcp.solvimon.com) only.
Ingests usage events and creates, updates and deletes meter configuration.
Actions: create, update, delete (meter config), ingest, batch_ingest (events)
Resource types: meters, meter_values, meter_value_calculations, meter_properties, meter_data, events
Send one event per discrete unit of activity. Do not pre-aggregate. Each event needs a unique reference (its idempotency key), meter_reference or meter_id, customer_id or customer_reference, and the measured amounts under meter_values[] as {reference, number} pairs. There is no flat value field.
- A meter property is
NUMBER,STRINGorENUM(withenum_values). Passmeter_idto attach it to a meter; on an ACTIVE meter it is created ACTIVE. - Updating a meter’s properties or values replaces its list. An update that would drop an existing entry is refused unless the body has
"allow_detach": true. - On a calculation only
nameanddescriptioncan change. Anything that defines what is measured needs a new calculation. The result lists the product items that use it.
Delete in dependency order: meter properties, then meter value calculations, then meter values, then meters. Product items that reference a meter must first be removed from active plan versions. The calculate action is deprecated; use get_metering calculate_cost.