1

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.

2

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.

curl --request GET \
  --url 'https://api.flatpeak.com/tariffs/rates/{id}?start_time=2023-06-15T09:00:00Z&end_time=2023-06-15T23:00:00Z' \
  --header 'Authorization: Bearer <token>'

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:

1

Your customer wants you to access their tariff

You build a switch in your app that the customer will activate to launch Connect.

2

You redirect Customer to Connect

Your app starts new session with Connect and redirects the Customer’s browser to Connect’s HTTP endpoint.

3

Customer selects their energy provider

Connect automatically chooses the best route to let your customer share their tariff information with your application:

OptionDescription
DIRECTLogin to account with their provider and grant you access to read their tariff.
LIBRARYPick up their tariff from FlatPeak-maintained tariff library.
MARKETConnect automatically maps customer’s location with energy market rates.
MANUALInput information about their tariff via a series of interactive screens.
4

Customer provides consent

Customer authorizes access to their account with their current energy provider. Connect gains access to the customer’s tariff.

Connect also discovers your customer’s contract cycle to automatically notify your systems when it changes.

5

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.

6

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.