- Introduction
- Authorization
- Events
- Customers
- Locations
- Tariff (elements)
- Devices
Connect
- Token management
- Session management
- Main pages
- Service pages
Cost reporting
- Meter submissions
- Cost calculations
- Raw tariff rates
Tariff (elements)
Create a tariff
Creates a tariff. Use this endpoint to manually create a tariff and link it to a Location. Useful when you are importing data to FlatPeak.
POST
/
tariffs
/
elements
curl --request POST \
--url https://api.flatpeak.com/tariffs/elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_641b90b758fb8e6293716e40",
"direction": "IMPORT",
"type": "COMMODITY",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 23.431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05
}
]
}
]
}
]
}
]
}'
{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"location_id": "loc_641b90b758fb8e6293716e40",
"live_mode": true,
"is_linked": false,
"connection_type": "MANUAL",
"direction": "IMPORT",
"type": "COMMODITY",
"status": "CONNECTED",
"timezone": "Europe/London",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 23.431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05
}
]
}
]
}
]
}
],
"time_created": "2023-05-05T05:37:27Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}
Authorizations
Body
application/json
Response
200
application/json
Example response
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.flatpeak.com/tariffs/elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_641b90b758fb8e6293716e40",
"direction": "IMPORT",
"type": "COMMODITY",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 23.431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05
}
]
}
]
}
]
}
]
}'
{
"id": "trf_66ba584eb6923d7c3b942ef6",
"object": "tariff",
"location_id": "loc_641b90b758fb8e6293716e40",
"live_mode": true,
"is_linked": false,
"connection_type": "MANUAL",
"direction": "IMPORT",
"type": "COMMODITY",
"status": "CONNECTED",
"timezone": "Europe/London",
"display_name": "Flexible Go 2023",
"provider_id": "prv_63a6087272921ef075a8fd3e",
"market_rates": false,
"contract_start_date": "2023-01-24T00:00:00Z",
"contract_end_date": "2024-01-24T00:00:00Z",
"schedule": [
{
"months": [
"All"
],
"days_and_hours": [
{
"days": [
"All"
],
"hours": [
{
"valid_from": "05:00:00",
"valid_to": "23:30:00",
"rate": [
{
"fixed": 23.431,
"to_kwh": 30.5,
"surcharge_fixed": 0.12,
"surcharge_percentage": 0.05
}
]
}
]
}
]
}
],
"time_created": "2023-05-05T05:37:27Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}
Assistant
Responses are generated using AI and may contain mistakes.