Skip to main content

Metering API

The Metering API manages smart meter data, meter counters, and meter readings for epilot customers and administrators.

Quick Start​

# List available operations
epilot metering

# Call an operation
epilot metering getCustomerMeters

Common Flags​

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operations​

ECP

  • getCustomerMeters β€” Retrieves all meters associated with the authenticated portal customer.
  • getMetersByContractId β€” Retrieves all meters associated with a given contract entity.
  • getMeter β€” Retrieves the full details of a specific meter by ID, including related entities and available journey actions.
  • updateMeter β€” Partially updates the details of a meter entity by ID.
  • getMeterCounters β€” Retrieves all meter counters associated with a given meter.
  • getCounterDetails β€” Retrieves the full details of a single meter counter by its ID.
  • createPortalMeterReadings β€” Inserts multiple meter readings at once for a given meter via the end customer portal.

ECP Admin

Metering

  • getReadingChangesets β€” GET /v1/metering/reading/{meter_id}/{counter_id}/changesets
  • applyReadingChangeset β€” Applies the proposed reading value to ClickHouse and removes the pending changeset.
  • dismissReadingChangeset β€” Removes the pending changeset without applying it. The reading value remains unchanged.
  • updateReadingChangeset β€” Updates the proposed value of a pending changeset without going through the normal write path.

getCustomerMeters​

Retrieves all meters associated with the authenticated portal customer.

GET /v1/metering/meter

Parameters

NameInTypeRequiredDescription
include_pending_changesetsquerybooleanNoWhen true, the response includes a pending_changesets field with the list of pending reading changesets alongside the confirmed readings.

Sample Call

epilot metering getCustomerMeters

With JSONata filter:

epilot metering getCustomerMeters --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "MelatengΓΌrtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"journey_actions": {
"journey_id": "string",
"action_label": {
"en": "string",
"de": "string"
},
"slug": "string",
"rules": [
{
"entity": "string",
"attribute": "string",
"attribute_value": "string"
}
]
},
"last_reading": "2022-10-10",
"current_consumption": 100.5
}
]
}

getMetersByContractId​

Retrieves all meters associated with a given contract entity.

GET /v1/metering/contract/meters/{contract_id}

Parameters

NameInTypeRequiredDescription
contract_idpathstring (uuid)YesThe ID of the Contract.

Sample Call

epilot metering getMetersByContractId \
-p contract_id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering getMetersByContractId 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getMetersByContractId -p contract_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "MelatengΓΌrtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
}
]
}

getMeter​

Retrieves the full details of a specific meter by ID, including related entities and available journey actions.

GET /v1/metering/meter/{id}

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)YesThe ID of the meter.

Sample Call

epilot metering getMeter \
-p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering getMeter 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"entity": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "MelatengΓΌrtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
},
"journey_actions": {
"journey_id": "string",
"action_label": {
"en": "string",
"de": "string"
},
"slug": "string",
"rules": [
{
"entity": "string",
"attribute": "string",
"attribute_value": "string"
}
]
},
"relations": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z"
}
]
}
}

updateMeter​

Partially updates the details of a meter entity by ID.

PATCH /v1/metering/meter/{id}

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)YesThe ID of the meter.

Request Body

Sample Call

epilot metering updateMeter \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-d '{}'

Using positional args for path parameters:

epilot metering updateMeter 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "MelatengΓΌrtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
}
}

getMeterCounters​

Retrieves all meter counters associated with a given meter.

GET /v1/metering/counter

Parameters

NameInTypeRequiredDescription
meter_idquerystring (uuid)Yes

Sample Call

epilot metering getMeterCounters \
-p meter_id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getMeterCounters -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter_counter",
"obis_number": "A-34",
"direction": "feed-in",
"transformer_ratio": 70,
"unit": "string",
"forecast_reading_value": 270,
"forecast_as_of": "2022-12-10",
"current_consumption": 240,
"last_reading": "2022-10-10",
"conversion_factor": 3,
"tariff_type": "ht"
}
]
}

getCounterDetails​

Retrieves the full details of a single meter counter by its ID.

GET /v1/metering/counter/{counter_id}

Parameters

NameInTypeRequiredDescription
counter_idpathstringYesThe ID of the counter.

Sample Call

epilot metering getCounterDetails \
-p counter_id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering getCounterDetails 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getCounterDetails -p counter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter_counter",
"obis_number": "A-34",
"direction": "feed-in",
"transformer_ratio": 70,
"unit": "string",
"forecast_reading_value": 270,
"forecast_as_of": "2022-12-10",
"current_consumption": 240,
"last_reading": "2022-10-10",
"conversion_factor": 3,
"tariff_type": "ht"
}
}

createMeterReading​

Inserts a new meter reading.

POST /v1/metering/reading

Parameters

NameInTypeRequiredDescription
directquerybooleanNoWhen true, bypasses changeset interception and writes directly to ClickHouse. Used by trusted integrations (e.g., ERP sync) to confirm changes and auto-clear matching pending changesets.

Request Body (required)

Sample Call

epilot metering createMeterReading

With request body:

epilot metering createMeterReading \
-d '{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}'

Using stdin pipe:

cat body.json | epilot metering createMeterReading

With JSONata filter:

epilot metering createMeterReading --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}

createMeterReadings​

Inserts multiple meter readings at once. Limited to 100 readings per request.

POST /v1/metering/readings

Parameters

NameInTypeRequiredDescription
asyncquerybooleanNoDon't wait for the reading to become available in GetReadings API. Useful for large migrations
activity_idquerystring (ulid)NoActivity to include in event feed
skip_validationquerybooleanNoWhen set to true, all validations will be skipped and the system will allow the reading to be created.

If set to false or not provided, the system performs the following validations: Validation Rule | | direct | query | boolean | No | When true, bypasses changeset interception and writes directly to ClickHouse. Used by trusted integrations (e.g., ERP sync) to confirm changes and auto-clear matching pending changesets. | | create_ticket | query | boolean | No | Controls whether a manual-intervention ("Übermittlung ZÀhlerstand") ticket is created for the written readings. Defaults to true, preserving portal/journey behaviour (readings with source ECP or journ |

Request Body (required)

Sample Call

epilot metering createMeterReadings

With request body:

epilot metering createMeterReadings \
-d '{
"readings": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}'

Using stdin pipe:

cat body.json | epilot metering createMeterReadings

With JSONata filter:

epilot metering createMeterReadings --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}

createPortalMeterReadings​

Inserts multiple meter readings at once for a given meter via the end customer portal.

POST /v1/metering/readings/{meter_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
directquerybooleanNoWhen true, bypasses changeset interception and writes directly to ClickHouse. Used by trusted integrations (e.g., ERP sync) to confirm changes and auto-clear matching pending changesets.

Request Body (required)

Sample Call

epilot metering createPortalMeterReadings \
-p meter_id=123e4567-e89b-12d3-a456-426614174000

With request body:

epilot metering createPortalMeterReadings \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"readings": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}'

Using positional args for path parameters:

epilot metering createPortalMeterReadings 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}

batchWriteMeterReadings​

Upserts or deletes multiple meter readings at once. Limited to 100 readings per request.

POST /v2/metering/readings

Parameters

NameInTypeRequiredDescription
asyncquerybooleanNoDon't wait for the reading to become available in GetReadings API. Useful for large migrations
skip_validationquerybooleanNoWhen set to true, all validations will be skipped and the system will allow the reading to be created.

If set to false or not provided, the system performs the following validations: Validation Rule | | activity_id | query | string (ulid) | No | Activity to include in event feed | | direct | query | boolean | No | When true, bypasses changeset interception and writes directly to ClickHouse. Used by trusted integrations (e.g., ERP sync) to confirm changes and auto-clear matching pending changesets. | | create_ticket | query | boolean | No | Controls whether a manual-intervention ("Übermittlung ZÀhlerstand") ticket is created for the written readings. Defaults to true, preserving portal/journey behaviour (readings with source ECP or journ |

Request Body (required)

Sample Call

epilot metering batchWriteMeterReadings

With request body:

epilot metering batchWriteMeterReadings \
-d '{
"identifiers": ["string"],
"readings": [
{
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T10:00:00Z",
"external_id": "string",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"operation": "create",
"value": 240,
"source": "ECP",
"read_by": "John Doe",
"reason": "",
"status": "valid",
"remark": "Customer reported unusual consumption",
"note": "string",
"unit": "string"
}
]
}'

Using stdin pipe:

cat body.json | epilot metering batchWriteMeterReadings

With JSONata filter:

epilot metering batchWriteMeterReadings --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}

pruneMeterReadings​

Deletes every reading of a meter whose external_id is NOT in the provided keep list β€” in a single request.

POST /v2/metering/readings/prune

Parameters

NameInTypeRequiredDescription
asyncquerybooleanNoDon't wait for the deletions to become visible in GetReadings API. Useful for large prunes
activity_idquerystring (ulid)NoActivity to include in event feed
create_ticketquerybooleanNoControls whether a manual-intervention ("Übermittlung ZÀhlerstand") ticket is created for the

written readings. Defaults to true, preserving portal/journey behaviour (readings with source ECP or journ | | dry_run | query | boolean | No | When true, computes and returns the deleted/kept counts without deleting anything. |

Request Body (required)

Sample Call

epilot metering pruneMeterReadings

With request body:

epilot metering pruneMeterReadings \
-d '{
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"source": "ECP",
"keep_external_ids": ["erp-reading-1", "erp-reading-2"]
}'

Using stdin pipe:

cat body.json | epilot metering pruneMeterReadings

With JSONata filter:

epilot metering pruneMeterReadings --jsonata 'data'
Sample Response
{
"data": {
"deleted_count": 42,
"kept_count": 12
}
}

createMeterReadingFromSubmission​

Creates meter readings from a journey submission payload.

POST /v1/metering/reading/submission

Request Body (required)

Sample Call

epilot metering createMeterReadingFromSubmission

With request body:

epilot metering createMeterReadingFromSubmission \
-d '{
"org_id": "123",
"entity": {
"_org": "123",
"meterReadings": [
{
"meterId": "string",
"readings": [
{
"counterId": "string",
"direction": "feed-in",
"unit": "string",
"value": 240
}
],
"readingValue": 240,
"readingDate": "2022-10-10T10:10:00.000Z",
"readBy": "John Doe",
"reason": "",
"maloId": "A09-123",
"obisNumber": "A-34",
"readingUnit": "string",
"meterType": "one_tariff",
"feedInValue": 240,
"feedOutValue": 240,
"htValue": 240,
"ntValue": 240
}
]
}
}'

Using stdin pipe:

cat body.json | epilot metering createMeterReadingFromSubmission

With JSONata filter:

epilot metering createMeterReadingFromSubmission --jsonata 'message'
Sample Response
{
"message": "Successfully Processed"
}

getAllowedReadingForMeter​

Returns the allowed min/max reading range for each counter of the given meter.

GET /v1/metering/allowed/reading/{meter_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
timestampquerystringNoIf not provided, the system will default to now.

Sample Call

epilot metering getAllowedReadingForMeter \
-p meter_id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering getAllowedReadingForMeter 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getAllowedReadingForMeter -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"counter_id": "string",
"min_value": 0,
"max_value": 0
}
]
}

createReadingWithMeter​

Creates a meter reading along with meter lookup or creation by MA-LO ID and OBIS number.

POST /v1/metering/reading/with-meter

Request Body (required)

Sample Call

epilot metering createReadingWithMeter

With request body:

epilot metering createReadingWithMeter \
-d '{
"ma_lo_id": "A09-123",
"meter_id": "string",
"obis_number": "A-34",
"unit": "string",
"direction": "feed-in",
"tariff_type": "ht",
"value": 240,
"read_by": "John Doe",
"reason": "",
"timestamp": "2022-10-10T10:10:00.000Z",
"source": "ECP"
}'

Using stdin pipe:

cat body.json | epilot metering createReadingWithMeter

With JSONata filter:

epilot metering createReadingWithMeter --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}

getReadingsByInterval​

Retrieves all readings specified in an interval.

GET /v1/metering/reading/{meter_id}/{counter_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
counter_idpathstringYesThe ID of the counter.
start_datequerystringNoIf not provided, the system will default to 2000-01-01.
end_datequerystringNoIf not provided, the system will default to today's date.
directionquery"feed-in" | "feed-out"No
sizequerynumberNoReturns the first n results after the specified offset (from).

If this value is provided as -1, then it returns all results at once. | | from | query | number | No | | | type | query | "cumulative" | "relative" | Yes | Since meter readings are cumulative, users may need to request actual consumptions, which are the difference between consecutive measurements. If this value is provided as "cumulative", then actual re | | sort | query | "asc" | "desc" | No | If this value is provided as "asc", then the results will be sorted by the timestamp field in ascending order. If this value is provided as "desc", then the results will be sorted by the timestamp fie | | include_pending_changesets | query | boolean | No | When true, the response includes a pending_changesets field with the list of pending reading changesets alongside the confirmed readings. |

Sample Call

epilot metering getReadingsByInterval \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p type=example

Using positional args for path parameters:

epilot metering getReadingsByInterval 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getReadingsByInterval -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p type=example --jsonata 'results[0]'
Sample Response
{
"results": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
],
"hits": 120,
"firstRecordCreatedAt": "2022-10-01T20:00:00.000Z"
}

updateMeterReading​

Updates an existing meter reading identified by meter ID, counter ID, and timestamp.

PUT /v1/metering/reading/{meter_id}/{counter_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter entity.
counter_idpathstringYesThe ID of the counter entity.
timestampquerystringYesThe timestamp when the reading was created.

Request Body (required)

Sample Call

epilot metering updateMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z

With request body:

epilot metering updateMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z \
-d '{
"value": 240,
"read_by": "John Doe",
"reason": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
}
}'

Using positional args for path parameters:

epilot metering updateMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z

With JSONata filter:

epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}

deleteMeterReading​

Permanently deletes a meter reading identified by meter ID, counter ID, and timestamp.

DELETE /v1/metering/reading/{meter_id}/{counter_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter entity.
counter_idpathstringYesThe ID of the counter entity.
timestampquerystringYesThe timestamp when the reading was created.

Sample Call

epilot metering deleteMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z

Using positional args for path parameters:

epilot metering deleteMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering deleteMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data'
Sample Response
{
"data": {
"meterId": "string",
"counterId": "string",
"timestamp": "2022-10-01T20:00:00.000Z"
}
}

getReadingChangesets​

GET /v1/metering/reading/{meter_id}/{counter_id}/changesets

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
counter_idpathstringYesThe ID of the counter.

Sample Call

epilot metering getReadingChangesets \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering getReadingChangesets 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering getReadingChangesets -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'changesets'
Sample Response
{
"changesets": [
{
"changeset_id": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"proposed": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"previous": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"edit_mode": "external",
"match_strategy": "exact",
"timestamp_tolerance": "exact",
"created_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"id": "string"
},
"source": "360",
"fuzzy_config": {
"percentage_threshold": 0.01,
"absolute_threshold": 0
},
"dismissed_reason": "string",
"dismissed_at": "1970-01-01T00:00:00.000Z"
}
]
}

applyReadingChangeset​

Applies the proposed reading value to ClickHouse and removes the pending changeset.

POST /v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:apply

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
counter_idpathstringYesThe ID of the counter.
changeset_idpathstringYes

Sample Call

epilot metering applyReadingChangeset \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p changeset_id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot metering applyReadingChangeset 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering applyReadingChangeset -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p changeset_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'reading'
Sample Response
{
"reading": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
},
"changeset": {
"changeset_id": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"proposed": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"previous": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"edit_mode": "external",
"match_strategy": "exact",
"timestamp_tolerance": "exact",
"created_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"id": "string"
},
"source": "360",
"fuzzy_config": {
"percentage_threshold": 0.01,
"absolute_threshold": 0
},
"dismissed_reason": "string",
"dismissed_at": "1970-01-01T00:00:00.000Z"
}
}

dismissReadingChangeset​

Removes the pending changeset without applying it. The reading value remains unchanged.

POST /v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:dismiss

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
counter_idpathstringYesThe ID of the counter.
changeset_idpathstringYes

Request Body

Sample Call

epilot metering dismissReadingChangeset \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p changeset_id=123e4567-e89b-12d3-a456-426614174000 \
-d '{"reason":"string"}'

Using positional args for path parameters:

epilot metering dismissReadingChangeset 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot metering dismissReadingChangeset -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p changeset_id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering dismissReadingChangeset -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p changeset_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'changeset_id'
Sample Response
{
"changeset_id": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"proposed": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"previous": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"edit_mode": "external",
"match_strategy": "exact",
"timestamp_tolerance": "exact",
"created_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"id": "string"
},
"source": "360",
"fuzzy_config": {
"percentage_threshold": 0.01,
"absolute_threshold": 0
},
"dismissed_reason": "string",
"dismissed_at": "1970-01-01T00:00:00.000Z"
}

updateReadingChangeset​

Updates the proposed value of a pending changeset without going through the normal write path.

PATCH /v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}

Parameters

NameInTypeRequiredDescription
meter_idpathstringYesThe ID of the meter.
counter_idpathstringYesThe ID of the counter.
changeset_idpathstringYes

Request Body

Sample Call

epilot metering updateReadingChangeset \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p changeset_id=123e4567-e89b-12d3-a456-426614174000

With request body:

epilot metering updateReadingChangeset \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p changeset_id=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"proposed": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
}
}'

Using positional args for path parameters:

epilot metering updateReadingChangeset 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot metering updateReadingChangeset -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p changeset_id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot metering updateReadingChangeset -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p changeset_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'changeset_id'
Sample Response
{
"changeset_id": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"proposed": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"previous": {
"value": 0,
"direction": "feed-in",
"timestamp": "1970-01-01T00:00:00.000Z",
"reason": "string",
"remark": "string",
"read_by": "string",
"status": "valid",
"external_id": "string"
},
"edit_mode": "external",
"match_strategy": "exact",
"timestamp_tolerance": "exact",
"created_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"id": "string"
},
"source": "360",
"fuzzy_config": {
"percentage_threshold": 0.01,
"absolute_threshold": 0
},
"dismissed_reason": "string",
"dismissed_at": "1970-01-01T00:00:00.000Z"
}