For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
LoginSandbox
Platform GuidesAPI DocsSDKMCP ServerChangelog
Platform GuidesAPI DocsSDKMCP ServerChangelog
  • Solvimon API
    • Base URL
    • Authentication
    • HTTP status codes
    • Resources
    • Standardisation
  • Configuration API
      • GETGet a list of all meter value calculations
      • POSTCreate a meter value calculation
      • GETGet a meter value calculation by resource ID
      • DELDelete a meter value calculation by resource ID
      • PATCHUpdate a meter value calculation
  • Identity API
  • Transaction API
  • Event API
LoginSandbox
Configuration APIMeter Value Calculations

Create a meter value calculation

POST
/v:version/meter-value-calculations
POST
/v:version/meter-value-calculations
$curl -X POST https://test.api.solvimon.com/v1/meter-value-calculations \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "reference": "meter_value_calculation_receipt_scan",
> "calculation_type": "SUM",
> "meter_id": "metr_kwDeeN0tv5UDtxADed1o",
> "name": "Receipt scanning",
> "description": "Meter value calculation of the scanning of receipts",
> "persist": false,
> "meter_value_id": "metv_gwDeeN0tv5UxbHANeD1k",
> "meter_property_id": "metp_pwDeeN0tfldtVBAXeN1e"
>}'
1{
2 "object_type": "string",
3 "id": "string",
4 "reference": "string",
5 "name": "string",
6 "description": "string",
7 "calculation_type": "SUM",
8 "persist": true,
9 "meter_id": "string",
10 "meter": {
11 "object_type": "string",
12 "id": "string",
13 "reference": "string",
14 "name": "string",
15 "description": "string",
16 "status": "DRAFT",
17 "meter_values": [
18 {
19 "id": "string",
20 "object": {
21 "object_type": "string",
22 "id": "string",
23 "reference": "string",
24 "name": "string",
25 "description": "string",
26 "status": "DRAFT",
27 "type": "NUMBER"
28 },
29 "required": true
30 }
31 ],
32 "meter_properties": [
33 {
34 "id": "string",
35 "object": {
36 "object_type": "string",
37 "id": "string",
38 "reference": "string",
39 "name": "string",
40 "description": "string",
41 "status": "DRAFT",
42 "type": "NUMBER",
43 "enum_values": [
44 "string"
45 ]
46 },
47 "required": true
48 }
49 ]
50 },
51 "meter_value_id": "string",
52 "meter_value": {
53 "object_type": "string",
54 "id": "string",
55 "reference": "string",
56 "name": "string",
57 "description": "string",
58 "status": "DRAFT",
59 "type": "NUMBER"
60 },
61 "meter_property_id": "string",
62 "meter_property": {
63 "object_type": "string",
64 "id": "string",
65 "reference": "string",
66 "name": "string",
67 "description": "string",
68 "status": "DRAFT",
69 "type": "NUMBER",
70 "enum_values": [
71 "string"
72 ]
73 }
74}
Was this page helpful?
Previous

Get a meter value calculation by resource ID

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version

Headers

x-platform-idstringOptional
Platform ID.

Request

This endpoint expects an object.
referencestringRequiredformat: "^\S+$"0-256 characters
calculation_typeenum or nullRequired
The type of calculation used for this billable metric.
Allowed values:
meter_idstring or nullRequired
The ID of the meter.
namestring or nullOptionalformat: "^.*$"0-256 characters
descriptionstring or nullOptionalformat: "^.*$"0-256 characters
persistboolean or nullOptional

Indicate if the data of the billable metric must be persisted to the next billing period of the schedule (default is false).

meterobject or nullOptional
meter_value_idstring or nullOptional
The ID of the meter value.
meter_valueobject or nullOptional
meter_property_idstring or nullOptional
The ID of the meter property.
meter_propertyobject or nullOptional

Response

Created
object_typestring or nullRead-only
idstring or nullRead-only
referencestringformat: "^\S+$"0-256 characters
namestring or nullformat: "^.*$"0-256 characters
descriptionstring or nullformat: "^.*$"0-256 characters
calculation_typeenum or null
The type of calculation used for this billable metric.
Allowed values:
persistboolean or null

Indicate if the data of the billable metric must be persisted to the next billing period of the schedule (default is false).

meter_idstring or null
The ID of the meter.
meterobject or null
meter_value_idstring or null
The ID of the meter value.
meter_valueobject or null
meter_property_idstring or null
The ID of the meter property.
meter_propertyobject or null

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error