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

# Address

> Connect route that collects the user's postal address.

This route collects the user's postal address, which Connect uses to find suppliers, tariffs and programs.

To skip this route, set `postal_address` on the device's [location](/docs/energy-api/reference/locations/update.md) before you launch Connect.

> [tab] Preview (Manual)
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/address-input-manual.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=1e84504aa1d5d0da02d9759c80744cf8)

> [tab] Preview (Autocomplete)
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/address-input-autocomplete.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=7c791e2d560033119eb71b3b56ecbfd9)
>
> Add an address lookup, such as [Google Place Autocomplete](https://developers.google.com/maps/documentation/javascript/place-autocomplete), to avoid invalid addresses.

> [tab] Code
>
> ```json Connect response theme={"system"}
> {
>   "connect_session": "cos_6587fa4362341be5b524de3b",
>   "route": "address_input",
>   "live_mode": false,
>   "actions": [
>     "BACK",
>     "CLOSE"
>   ],
>   "data": {
>     "device_type": "BATTERY_STORAGE",
>     "location": {
>       "timezone": "Europe/London",
>       "currency_code": "GBP"
>     },
>     "postal_address": {
>       "address_line1": "",
>       "address_line2": "",
>       "city": "",
>       "state": "",
>       "post_code": "",
>       "country_code": ""
>     }
>   }
> }
> ```
>
> ```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": "address_input",
>   "data": {
>     "postal_address": {
>       "address_line1": "1-3",
>       "address_line2": "Strand",
>       "city": "London",
>       "state": "Greater London",
>       "post_code": "WC2N 5EH",
>       "country_code": "GB"
>     }
>   }
> }'
> ```
>
> #### Actions
>
> | Action | Result |
> | :- | :- |
> | `BACK` | Returns the previous page. If there is none, returns `callback_url`. |
> | `CLOSE` | Returns the `callback_url` set on the Connect session. |
>
> #### Errors
>
> | Error code | Description |
> | :- | :- |
> | `address_line1_missing` | Address line 1 is required. |
> | `city_missing` | City name is required. |
> | `post_code_missing` | Post code is required. |
> | `country_code_missing` | Country code is required. |
> | `country_code_invalid` | Country code must be in two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. |
> | `geo_location_not_found` | The address could not be geocoded. Send a complete address. |
> | `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.