Skip to main content
PUT
/
organizations
/
{orgId}
/
statementdefinitions
/
{id}
Update StatementDefinition
curl --request PUT \
  --url https://api.m3ter.com/organizations/{orgId}/statementdefinitions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "aggregationFrequency": "DAY",
  "version": 123,
  "name": "<string>",
  "includePricePerUnit": true,
  "dimensions": [
    {
      "name": "<string>",
      "filter": [
        "<string>"
      ],
      "meterId": "<string>",
      "attributes": [
        "<string>"
      ]
    }
  ],
  "measures": [
    {
      "meterId": "<string>",
      "name": "<string>",
      "aggregations": [
        "SUM"
      ]
    }
  ],
  "generateSlimStatements": true
}
'
{
  "id": "<string>",
  "version": 123,
  "name": "<string>",
  "aggregationFrequency": "DAY",
  "includePricePerUnit": true,
  "dimensions": [
    {
      "name": "<string>",
      "filter": [
        "<string>"
      ],
      "meterId": "<string>",
      "attributes": [
        "<string>"
      ]
    }
  ],
  "measures": [
    {
      "meterId": "<string>",
      "name": "<string>",
      "aggregations": [
        "SUM"
      ]
    }
  ],
  "generateSlimStatements": true,
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.

id
string
required

Body

application/json
aggregationFrequency
enum<string>
required

This specifies how often the Statement should aggregate data.

Available options:
DAY,
WEEK,
MONTH,
QUARTER,
YEAR,
WHOLE_PERIOD
version
integer<int64>

The version number of the entity:

  • Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
  • Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
name
string

Descriptive name for the StatementDefinition providing context and information.

includePricePerUnit
boolean

A Boolean indicating whether to include the price per unit in the Statement.

  • TRUE - includes the price per unit.
  • FALSE - excludes the price per unit.
dimensions
object[]

An array of objects, each representing a Dimension data field from a Meter (for Meters that have Dimensions setup).

measures
object[]

An array of objects, each representing a Measure data field from a Meter.

generateSlimStatements
boolean

Response

Returns the updated StatementDefinition

id
string
required

The unique identifier (UUID) of the StatementDefinition.

version
integer<int64>

The version number. Default value when newly created is one.

name
string

Descriptive name for the StatementDefinition providing context and information.

aggregationFrequency
enum<string>

This specifies how often the Statement should aggregate data.

Available options:
DAY,
WEEK,
MONTH,
QUARTER,
YEAR,
WHOLE_PERIOD
includePricePerUnit
boolean

A Boolean indicating whether to include the price per unit in the Statement.

  • TRUE - includes the price per unit.
  • FALSE - excludes the price per unit.
dimensions
object[]

An array of objects, each representing a Dimension data field from a Meter (for Meters that have Dimensions setup).

measures
object[]

An array of objects, each representing a Measure data field from a Meter.

generateSlimStatements
boolean
dtCreated
string<date-time>

The date and time (in ISO-8601 format) when the StatementDefinition was created.

dtLastModified
string<date-time>

The date and time (in ISO-8601 format) when the StatementDefinition was last modified.

createdBy
string

The unique identifier (UUID) of the user who created this StatementDefinition.

lastModifiedBy
string

The unique identifier (UUID) of the user who last modified this StatementDefinition.