> ## 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.

# Tariff Summary

> Shows tariff summary and energy price. Provides connection controls.

Once the tariff is successfully discovered, Connect returns this final page.

<Tabs>
  <Tab title="Preview">
    <Frame>
      <img src="https://mintcdn.com/flatpeak/CybEfBTBkMKVy_AS/images/anode/api-reference/12-tariff-summary-all.png?fit=max&auto=format&n=CybEfBTBkMKVy_AS&q=85&s=8d3f5455858dde21189cc2c1939c0942" style={{ width: "200px" }} width="1500" height="3132" data-path="images/anode/api-reference/12-tariff-summary-all.png" />
    </Frame>
  </Tab>

  <Tab title="Code">
    <CodeGroup>
      ```json Connect response theme={"system"}
      {
        "connect_token": "cot_6587fa4362341be5b524de3b",
        "route": "tariffs_summary",
        "direction": "IMPORT",
        "type": "COMMODITY",
        "live_mode": false,
        "actions": [
          "WRONG_TARIFF_REPORT",
          "EDIT",
          "DISCONNECT",
          "CLOSE",
          "BACK"
        ],
        "data": {
          "connection_type": "MARKET",
          "currency_code": "GBP",
          "market_rates_source": true,
          "provider": {
            "id": "prv_65de48b2977276d02acdb481",
            "display_name": "British Gas",
            "logo_url": "https://s.flatpeak.com/7276d02acdb481.png"
          },
          "tariff": {
            "status": "CONNECTED",
            "name": "Flex Next Go",
            "structure_type": "MARKET",
            "contract_start_date": "2023-06-15T00:00:00+02:00",
            "contract_end_date": "2024-06-15T00:00:00+02:00",
            "contract_term_type": "FIXED",
            "tiered": false
          },
          "rates": {
            "yesterday": [],
            "today": [
              {
                "valid_from": "2024-02-01T00:00:00+02:00",
                "valid_to": "2024-02-01T22:00:00+02:00",
                "tariff": {
                  "cost": 0.12,
                  "confidence": 1
                }
              },
              {
                "valid_from": "2024-02-01T22:00:00+02:00",
                "valid_to": "2024-02-01T00:00:00+02:00",
                "tariff": {
                  "cost": 0.09,
                  "confidence": 1
                }
              }
            ],
            "tomorrow": [
              {
                "valid_from": "2024-02-02T00:00:00+02:00",
                "valid_to": "2024-02-02T06:00:00+02:00",
                "tariff": {
                  "cost": 0.09,
                  "confidence": 1
                }
              },
              {
                "valid_from": "2024-02-02T06:00:00+02:00",
                "valid_to": "2024-02-03T00:00:00+02:00",
                "tariff": {
                  "cost": 0.12,
                  "confidence": 1
                }
              }
            ]
          }
        }
      }
      ```

      ```json Your POST to Connect (action) theme={"system"}
      curl --request POST \
        --url https://connect.flatpeak.com \
        --header 'Content-Type: application/json' \
        --data '{
        "connect_token": "cot_6587fa4362341be5b524de3b",
        "route": "tariffs_summary",
        "action": "CLOSE"
      }'
      ```
    </CodeGroup>

    **Validation errors explained**:

    When you POST the response, Connect may return any of these validation errors:

    | Error Code          | Error Description                         |
    | ------------------- | ----------------------------------------- |
    | `action_missing`    | Action parameter is required.             |
    | `action_invalid`    | Action parameter XX is not supported.     |
    | `data_json_invalid` | Data does not conform to the JSON schema. |

    <Note>Note, time is returned in RFC3339 format with offset. i.e. 2024-06-15T03:12:00+02:00</Note>
  </Tab>
</Tabs>

**Supported actions**:

| Action                | Result                                                                                                 |
| :-------------------- | :----------------------------------------------------------------------------------------------------- |
| `EDIT`                | Restarts the flow from the [Provider Selection](/api-reference/anode/connect/provider-selection) page. |
| `DISCONNECT`          | Disconnects the tariff and completes the session.                                                      |
| `WRONG_TARIFF_REPORT` | Report incorrect tariff to Flatpeak. Not available if already reported.                                |
| `BACK`                | Returns previous page.                                                                                 |
| `CLOSE`               | Returns `callback_url` you specified when creating the Connect token.                                  |
