Documentation Index Fetch the complete documentation index at: https://docs.flatpeak.com/llms.txt
Use this file to discover all available pages before exploring further.
This step allows the customer to enter their electricity price manually. Depending on the tariff structure selected earlier in the flow, customer may provide a single fixed price (FIXED) or multiple time of day prices (TIME_OF_DAY).
Developer notes
By default, display a single fixed price input (Fixed).
Allow customers to add additional pricing periods and display them as time ranges (ToU).
If all pricing periods are removed, revert to the fixed price input.
The data structure and validation rules follow the Create a tariff API endpoint.
Preview (Fixed)
Preview (ToU)
Code
hours.valid_from and hours.valid_to shall be returned as entered.
hours.cost shall be returned in large currency units.
Connect response
Your POST to Connect
{
"connect_token" : "cot_6587fa4362341be5b524de3b" ,
"route" : "price_input" ,
"direction" : "IMPORT" ,
"type" : "COMMODITY" ,
"live_mode" : false ,
"data" : {
"currency_code" : "GBP" ,
"provider" : {
"id" : "prv_65de3167136dda41ceba3c2f" ,
"display_name" : "EDF" ,
"logo_url" : "https://s.flatpeak.com/dda41ceba3c2f.png"
},
"hours" : [
{
"cost" : 0 ,
"valid_from" : "00:00:00" ,
"valid_to" : "00:00:00"
}
]
}
}
Actions Following actons are supported when responding to Connect on this route: Action Result BACKReturns previous page. CLOSEReturns callback_url you specified when creating the Connect token.
Errors When you POST your response to Connect, the following validation errors may be returned: Error Code Error Description cost_value_zeroTariff rate (cost) cannot be zero. cost_value_negativeTariff rate (cost) must be greater than zero. valid_from_invalidTime period start must be in format HH:mm:ss. valid_to_invalidTime period end must be in format HH:mm:ss. gap_in_time_periodGap between XX and YY is found in the time period. incomplete_time_periodTime period must cover the full 24 hours. data_json_invalidData does not conform to the JSON schema.