Skip to main content
POST
/
audits
/
prices
/
{id}
Audit a price
curl --request POST \
  --url https://api.flatpeak.com/audits/prices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "start_time": "2023-06-15T09:00:00Z",
  "end_time": "2023-06-15T23:00:00Z",
  "tariff_direction": "IMPORT"
}'
{
  "id": "tra_65e42cdd73e9f861edda35d7",
  "object": "price_audit",
  "live_mode": true,
  "location_id": "loc_65e42ce4d3b813479b252160",
  "location_timezone": "Europe/Berlin",
  "currency_code": "EUR",
  "tariff_direction": "IMPORT",
  "request": {
    "tariff_direction": "IMPORT",
    "start_time": "2024-05-24T14:15:22Z",
    "end_time": "2024-05-24T15:15:22Z"
  },
  "market_sources": [
    "mrs_65792b4df61b16685ebd2e78"
  ],
  "data": [
    {
      "valid_from": "2024-12-28T01:00:00Z",
      "valid_to": "2024-12-28T02:00:00Z",
      "price_breakdown": {
        "commodity": {
          "market": 4.998,
          "fixed": 0.124,
          "percentage": 0.11,
          "tier": 100,
          "aggregate": 17.994
        },
        "non_commodity": {
          "fixed": 7.122,
          "tier": 10000
        },
        "total": 25.116,
        "confidence": 0.8
      }
    }
  ],
  "time_created": "2024-05-24T15:15:22Z",
  "account_id": "acc_661677911f2197045e6cf1b1"
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak Location ID

Example:

"loc_66879edb94bf861548cb7428"

Body

application/json
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"

start_time
string<date-time>

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"

tariff_direction
string

Specifies the tariff direction; set to IMPORT, EXPORT, or LOCAL. Defaults to IMPORT.

Example:

"IMPORT"

Response

200 - application/json
id
string
required

Flatpeak unique object ID for this response.

Example:

"tra_65e42cdd73e9f861edda35d7"

object
string
required

Represents the object’s type. I.e. price_audit.

Example:

"price_audit"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

location_id
string
required

Flatpeak location ID.

Example:

"loc_65e42ce4d3b813479b252160"

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.

Example:

"EUR"

request
object
required

Your original request.

data
object[]
required

Response data.

time_created
string
required

Time when this response was calculated. In UTC.

Example:

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

account_id
string
required

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

tariff_direction
string

Direction of tariff. Supported options are IMPORT and EXPORT.

Example:

"IMPORT"

market_sources
string[]

Flatpeak ID for market rates geographical regions. Flatpeak sets this automatically using the postal_address property of the Location object. For more information and to resolve IDs to region names, see the market rates reference in docs.