Skip to main content
GET
/
locations
/
{id}
Retrieve a location
curl --request GET \
  --url https://api.flatpeak.com/locations/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "loc_641b90b758fb8e6293716e40",
  "object": "location",
  "live_mode": true,
  "postal_address_verified": false,
  "time_created": "2023-11-07T05:31:56Z",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "reference_id": "LOC1234567890",
  "customer_id": "cus_65e421d1daa4a24082b4f590",
  "timezone": "Europe/London",
  "currency_code": "EUR",
  "postal_address": {
    "address_line1": "1-3",
    "address_line2": "Strand",
    "city": "London",
    "state": "Greater London",
    "post_code": "WC2N 5EH",
    "country_code": "GB"
  },
  "geo_location": {
    "lat": 50.12345,
    "lng": -1.23456
  },
  "market_sources": {
    "import": "mrs_65792b4ef61b16685ebd2ec1"
  },
  "tariff_elements": [
    {
      "status": "CONNECTED",
      "provider_id": "prv_65b78bbdd8e83b06a60e38c2",
      "tariff_id": "trf_66ba584eb6923d7c3b942ef6",
      "devices": [
        "dev_63a6087272941ef077a8fd3e"
      ],
      "type": "COMMODITY",
      "direction": "IMPORT",
      "connect_token": "cot_65df3e949a785c52283026ec",
      "temporary": false,
      "consents": {
        "provider_tariff": true,
        "provider_bills": true,
        "provider_postal_address": true,
        "provider_grid_meter": true,
        "device_telemetry": true,
        "device_control": true,
        "time_created": "2022-03-22T11:12:21Z"
      }
    }
  ],
  "devices": [
    "dev_63a6087272941ef077a8fd3e"
  ]
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak location_id

Example:

"loc_d47751032d2748d2bce8ec55b2006def"

Response

Response example

This object represents a supply address.

id
string
required

Flatpeak unique location ID

Example:

"loc_641b90b758fb8e6293716e40"

object
string
required

Represents the object’s type. I.e. location.

Example:

"location"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

postal_address_verified
boolean
default:false
required

Indicates is postal address has been verified by a third-party.

Example:

false

time_created
string<date-time>
required

Time when the object was created, in UTC.

account_id
string
required

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

reference_id
string

A reference that is meaningful to you, for example, an ID from your system.

Example:

"LOC1234567890"

customer_id
string

Flatpeak customer ID.

Example:

"cus_65e421d1daa4a24082b4f590"

timezone
string

The timezone at the location, in 'tz database format'. I.e. 'Europe/Berlin'.

Example:

"Europe/London"

currency_code
string

Currency at the location in ISO 4217.

Example:

"EUR"

postal_address
PostalAddress · object

Information on the postal address.

geo_location
GeoLocation · object

Latitude and longitude of the location. Flatpeak resolves this automatically using the postal_address that you provide. This information is used to determine market price and carbon regions.

market_sources
object

Flatpeak IDs for market rates geographical regions. Flatpeak sets this automatically using the postal_address. For more information and to resolve IDs to region names, see the market rates reference in docs.ference in docs.

tariff_elements
object[]

An array of tariffs that apply to this location.

devices
string[]

An array of Flatpeak Device IDs associated with this Location.