Skip to main content
POST
Optimize by price limit

Authorizations

Authorization
string
header
required

Bearer token obtained from POST /auth/tokens.

Path Parameters

device_id
string
required

Flatpeak Device ID.

Example:

"dev_63a6087272941ef077a8fd3e"

Body

application/json
start_time
string<date-time>
required

RFC 3339 timestamp marking the start of the data window, for example 2026-06-15T09:00:00Z or 2026-06-15T08:00:00+01:00. Use either UTC or a time offset. If offsets differ, end_time takes precedence.

Example:

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

end_time
string<date-time>
required

RFC 3339 end of the window, for example 2026-06-15T13:00:00Z. At most 3 days after start_time.

Example:

"2026-06-16T09:00:00Z"

import
object

Import optimization request.

export
object

Export optimization request.

Response

Optimization by limit response.

Tariff rate segments.

id
string
required

Flatpeak Optimization ID.

Example:

"opt_65e42cdd73e9f861edda35d7"

object
enum<string>
required

Object type.

Available options:
optimization_limit
Example:

"optimization_limit"

live_mode
boolean
required

true for live data, false for test data.

device_id
string
required

Flatpeak Device ID.

Example:

"dev_63a6087272941ef077a8fd3e"

location_id
string
required

Flatpeak Location ID.

Example:

"loc_65e42ce4d3b813479b252160"

timezone
string
required

Timezone at the location, tz database name such as Europe/Berlin.

Example:

"Europe/London"

currency_code
string
required

Currency at the location in ISO 4217.

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

"EUR"

data
PriceWindow · object[]
required

The price windows of the optimization, in time order.

account_id
string
required

Flatpeak Account ID.

Example:

"acc_661677911f2197045e6cf1b1"

time_created
string<date-time>
required

Time when this response was calculated. In UTC.

Example:

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