Skip to main content
POST
/
prices
/
audit
Audit a price
curl --request POST \
  --url https://api.flatpeak.com/prices/audit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "device_id": "dev_63a6087272941ef077a8fd3e",
  "start_time": "2023-06-15T09:00:00Z",
  "end_time": "2023-06-15T23:00:00Z"
}
'
{
  "id": "tra_65e42cdd73e9f861edda35d7",
  "object": "price_audit",
  "location_id": "loc_65e42ce4d3b813479b252160",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "live_mode": true,
  "location_timezone": "Europe/Berlin",
  "currency_code": "EUR",
  "data": [
    {
      "valid_from": "2024-12-28T01:00:00Z",
      "valid_to": "2024-12-28T02:00:00Z",
      "price": {
        "commodity_import": {
          "value": 14.998,
          "vat": 0.124,
          "confidence": 0.8,
          "temporary": false
        },
        "commodity_export": {
          "value": 14.998,
          "vat": 0.124,
          "confidence": 0.8,
          "temporary": false
        },
        "non_commodity_import": {
          "value": 7.122,
          "vat": 0.19,
          "confidence": 1,
          "temporary": true
        },
        "total": 25.116
      }
    }
  ],
  "time_created": "2024-05-24T15:15:22Z",
  "device_id": "dev_63a6087272941ef077a8fd3e",
  "energy_flow_direction": "IMPORT",
  "last_updated": "2024-05-25T15:15:22Z"
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Body

application/json
device_id
string
required

Flatpeak Device ID

Example:

"dev_63a6087272941ef077a8fd3e"

start_time
string<date-time>
required

RFC 3339 timestamp marking the start of the data window, e.g. 2023-06-15T09:00:00Z or 2023-06-15T08:00:00+01:00; use either UTC or time offset—if offsets differ, end_time takes precedence.

Example:

"2023-06-15T09:00:00Z"

end_time
string<date-time>
required

RFC 3339 timestamp marking the end of the data window, e.g. 2023-06-15T13:00:00Z or 2023-06-15T12:00:00+01:00; use either UTC or time offset—if offsets differ, end_time takes precedence; max range is 90 days.

Example:

"2023-06-15T23:00:00Z"

Response

200 OK: a detailed breakdown of how the energy price was calculated.

id
string
required

Flatpeak unique object ID for this response.

Pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
Example:

"tra_65e42cdd73e9f861edda35d7"

object
enum<string>
default:price_audit
required

Object type.

Available options:
price_audit
Example:

"price_audit"

location_id
string
required

Flatpeak location ID.

Pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
Example:

"loc_65e42ce4d3b813479b252160"

account_id
string
required

Flatpeak Account ID.

Pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
Example:

"acc_661677911f2197045e6cf1b1"

live_mode
boolean
required

Set to true if the object exists in live mode, otherwise false.

location_timezone
string
required

The timezone at the location, in 'tz database format'. I.e. 'Europe/Berlin'.

Example:

"Europe/Berlin"

currency_code
string
required

Currency at the location in ISO 4217.

Pattern: ^[A-Z]{3}$
Example:

"EUR"

data
object[]
required

Response data.

time_created
string<date-time>
required

Time when this response was calculated. In UTC.

Example:

"2024-05-24T15:15:22Z"

device_id
string

Flatpeak device ID.

Pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
Example:

"dev_63a6087272941ef077a8fd3e"

energy_flow_direction
enum<string>

Direction of energy flow this applies to. IMPORT (from grid) or EXPORT (to grid).

Available options:
IMPORT,
EXPORT
Example:

"IMPORT"

last_updated
string<date-time>

Time the underlying rates were last refreshed (distinct from time_created, which is when this response was generated). RFC3339.

Example:

"2024-05-25T15:15:22Z"