The Connect API methods differ from the rest of the FlatPeak API. They use a single endpoint that functions like a chatbot, exchanging a predefined set of JSON-formatted questions and responses. Review the Connect Section in API reference.

Here’s how it works:

1

Initiating the Session

Your customer begins by clicking a “Connect My Tariff” button (or similarly named control) in your app.

Your app should then:

2

Receiving Page Objects

Once the session starts, your app will receive one of fifteen possible Connect Page Objects. Each object contains all the necessary information to render a page that guides the customer through the next step in tariff discovery process.

3

Handling Customer Actions

For each page:

  • Your app captures the user’s input.
    • Submits the response to the Connect endpoint.
    • Receives the next Page Object to render the next step.

Connect dynamically determines the next page based on the customer’s previous responses and returns a corresponding page object. This process continues until Connect determines the session is complete.

4

Completing the Session

Once the customer’s tariff is successfully connected:

  • Connect returns a special session_complete object.
  • A webhook is triggered to notify your backend systems that:
    • The session is complete
  • You can now exchange the connect_token for a permanent location_id that represents a property address.
5

Subscribe to tariff lifecycle webhooks

After your customer completes the Connect flow, FlatPeak will automatically keep their tariff information up to date. If any action is required from the customer, FlatPeak will generate an event. You should subscribe to these events via webhooks and implement a communication flow to notify your customers and guide them through the necessary steps (below).

6

Let customers view their tariff and change connection

Customers may wish to modify their tariff settings from time to time or when you notify them of a detected change (webhook). To support these scenarios, follow the Building a tariff settings page in your app guide to add controls that let them update or reconnect their energy account.

Next steps

You can now query the FlatPeak API for your customer’s tariff data and access all other energy intelligence endpoints.

Choose from two different integration paths for this step:

Use out fast-track planning and cost reporting endpoints

Get raw tariff and implement planning and cost reporting yourself