> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Supplier

> Connect route where the user picks their energy supplier.

The user picks their supplier from the list for their address. If it is not listed, send `SUPPLIER_MISSING`. Support this path so every user can finish.

> [tab] Preview
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/select-provider-logos.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=44b5c5116469628897fb8c29ed9ba5fa)

> [tab] Code
>
> ```json Connect response theme={"system"}
> {
>   "connect_session": "cos_6587fa4362341be5b524de3b",
>   "route": "supplier_select",
>   "live_mode": false,
>   "actions": [
>     "CHANGE_ADDRESS",
>     "SUPPLIER_MISSING",
>     "BACK",
>     "CLOSE"
>   ],
>   "data": {
>     "device_type": "BATTERY_STORAGE",
>     "location": {
>       "timezone": "Europe/London",
>       "currency_code": "GBP"
>     },
>     "postal_address": {
>       "address_line1": "1-3",
>       "address_line2": "Strand",
>       "city": "London",
>       "state": "Greater London",
>       "post_code": "WC2N 5EH",
>       "country_code": "GB"
>     },
>     "suppliers": [
>       {
>         "id": "sup_65b78bbdd8e83b06a60e38c2",
>         "display_name": "British Gas",
>         "logo_url": "https://s.flatpeak.com/83b06a60e38c2.png",
>         "connection_types": ["DIRECT", "MARKET"]
>       },
>       {
>         "id": "sup_64b83f455cb6e881442244f8",
>         "display_name": "EDF Energy",
>         "logo_url": "https://s.flatpeak.com/6e881442244f8.png",
>         "connection_types": ["DIRECT", "LIBRARY"]
>       }
>     ]
>   }
> }
> ```
>
> ```bash Your POST to Connect (data) theme={"system"}
> curl --request POST \
>   --url https://connect.flatpeak.com \
>   --header 'Content-Type: application/json' \
>   --data '{
>   "connect_session": "cos_6587fa4362341be5b524de3b",
>   "route": "supplier_select",
>   "data": {
>     "supplier": {
>       "id": "sup_65b78bbdd8e83b06a60e38c2"
>     }
>   }
> }'
> ```
>
> #### Actions
>
> | Action | Result |
> | :- | :- |
> | `CHANGE_ADDRESS` | Returns [Address](/docs/energy-api/reference/connect/tariff/address.md). |
> | `SUPPLIER_MISSING` | Returns the next page of the flow. |
> | `BACK` | Returns the previous page. |
> | `CLOSE` | Returns the `callback_url` set on the Connect session. |
>
> #### Connection types
>
> `connection_types` is for information: `DIRECT` means the user signs in to their supplier account, `LIBRARY` that the tariff comes from Flatpeak's tariff library, and `MARKET` that prices follow a wholesale market index. Connect picks the path after the supplier is chosen, so do not branch on this field.
>
> #### Errors
>
> | Error code | Description |
> | :- | :- |
> | `supplier_id_missing` | Supplier ID is required. |
> | `supplier_not_found` | Supplier ID sup\_XX not found. |
> | `supplier_id_invalid` | Supplier ID sup\_XX is not available at your address (XX). |
> | `data_json_invalid` | Data does not conform to the JSON schema. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.