Plan your integration
It only takes two steps to integrate FlatPeak into your app and back-end before you can start making requests for your customer’s energy tariff.
Your customer launches Connect
FlatPeak Tariff Connect is an embeddable user interface module that enables your customers to give your application consent to access their energy tariff. It automatically picks the best and shortest route to save your customer’s time thus reducing the barrier of getting tariff connected.
Your start making requests to FlatPeak API for customer's tariff
Once the Customer completes the Connect flow, your systems can start making requests to FlatPeak’s tariff-rates, cost-calculations and other API endpoints.
Choosing the Connect architecture that’s right for you
Connect is a tariff discovery and access authorization user interface. It is your customer’s first and only touchpoint with FlatPeak.
Depending on your user experience requirements and application architecture, you can implement the Connect in two ways:
Your customer wants you to access their tariff
You build a switch in your app that the customer will activate to launch Connect.
You redirect Customer to Connect
Your app starts new session with Connect and redirects the Customer’s browser to Connect’s HTTP endpoint.
Customer selects their energy provider
Connect automatically chooses the best route to let your customer share their tariff information with your application:
Option | Description |
---|---|
DIRECT | Login to account with their provider and grant you access to read their tariff. |
LIBRARY | Pick up their tariff from FlatPeak-maintained tariff library. |
MARKET | Connect automatically maps customer’s location with energy market rates. |
MANUAL | Input information about their tariff via a series of interactive screens. |
Customer provides consent
Customer authorizes access to their account with their current energy provider. Connect gains access to the customer’s tariff.
Connect redirects the Customer back to your app
Once the Customer has completed the Connect flow, the onComplete callback is invoked redirecting your customer’s browsing session back into your app.
Connect keeps tariff information up to date
Connect will continuously maintain tariff data’s accuracy via many routes and methods, depending on how it was originally discovered. You will receive webhook notifications if customers switch providers or their contract has expired - so you can ask them to relaunch Connect.
Follow the Single-page web app tutorial to implement Connect as a single-page app.
Choosing API integration architecture
Once your Customer completes the Connect flow, your back-end service can start calling FlatPeak API to get their tariff rates.
Alternatively, you can simply submit electricity metering records (reads) from the Customer’s property meter or your device and request FlatPeak to calculate energy costs.
Submit electricity meter records and get FlatPeak to calculate the energy cost for you.
Read more about FlatPeak’s tariff data model and cost calculations.
Follow the Calculating energy cost tutorial for help choosing the best cost-reporting integration architecture for your use case.
Was this page helpful?