Skip to main content
GET
/
partner
/
v1
/
customers
/
{customerNumber}
/
contracts
/
{contractNumber}
/
metrics
Get contract metrics
curl --request GET \
  --url https://api.rabot-charge.de/partner/v1/customers/{customerNumber}/contracts/{contractNumber}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "isSuccess": true,
  "message": null,
  "error": [
    {
      "severity": "Error",
      "code": "validation-failed",
      "message": "First name is required for non-business customers.",
      "details": null
    }
  ],
  "refUri": "<string>",
  "data": {
    "valueUnitInfo": "in kWh",
    "consideredDataPeriod": {
      "from": "2024-09-13 22:00:00",
      "to": "2024-09-29 22:00:00"
    },
    "metricType": "Consumption",
    "valueType": "Dynamic",
    "interval": "Daily",
    "intervalDuration": 16,
    "averageValuePerInterval": 0.7036,
    "totalValue": 11.2583,
    "numberOfEntries": 16,
    "records": [
      {
        "moment": "2024-09-13 22:00:00",
        "value": 0.7001,
        "valueRelevanceType": "Forecast",
        "valueState": "Final"
      }
    ]
  }
}
This endpoint can be used to retrieve information about energy consumption and pricing, both for past periods as well as future forecast data. See the guide section for more information and examples on how to use this API endpoint.
Requires role:application scope or Linked relation on customer level.

Authorizations

Authorization
string
header
required

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

Path Parameters

customerNumber
string
required

Customer number

contractNumber
string
required

Contract number

Query Parameters

Period.From
string<date-time>

Start of period

Period.To
string<date-time>

End of period

Interval
enum<string>

Information about interval to get contract metrics Interval of contract metrics

Members:

  • QuarterHourly - QuarterHourly
  • Hourly - Hourly
  • Daily - Daily
  • Weekly - Weekly
  • Monthly - Monthly
  • Yearly - Yearly

Available options:
QuarterHourly,
Hourly,
Daily,
Weekly,
Monthly,
Yearly
MetricType
enum<string>

Information about metric type to get contract metrics Type of contract metrics

Members:

  • Consumption - Total energy consumption (kWh) in the selected period
  • Saving - Monetary savings in the selected period (EUR), compared to the local default supplier (Grundversorger)
  • TotalCost - Total cost in the selected period (EUR). This includes both working price (per kWh) and base price (per month) cost components. For periods shorter than one month, the base price is prorated accordingly. Note that this can differ from invoiced amounts depending on the tariff conditions.
  • WorkingPrice - Working price (EUR/kWh) in the selected period. Note that this can differ from invoiced amounts depending on the tariff conditions.
  • Co2Saving - Savings in CO2 emissions in kg, based on the default energy grid mix

Available options:
Consumption,
Saving,
TotalCost,
WorkingPrice,
Co2Saving
ValueType
enum<string>

Information about metric value type to get contract metrics Type of returned value

Members:

  • Actual - Always return actual data only
  • Forecast - Always return forecast data only
  • Dynamic - Dynamically returns actual OR forecast data (never mixed) based on backend decision.
  • Combined - Combine forecast values and actual values. Show actual values instead of forecast values for a specific moment if available.

Available options:
Actual,
Forecast,
Dynamic,
Combined

Response

200 - application/json

OK

API response DTO with data.

isSuccess
boolean

Success status of the operation based on status code (2xx range).

Example:

true

message
string | null

Optional message to provide additional information about the operation result.

Example:

null

error
object[] | null

Optional error details in case of an error(s).

refUri
string<uri> | null

Optional reference URI to point to the resulting resource.

data
object

Returned data instance.