Skip to main content
PATCH
/
locations
/
{location_id}
Update a location
curl --request PATCH \
  --url https://api.flatpeak.com/locations/{location_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reference_id": "LOC1234567890",
  "customer_id": "cus_65e421d1daa4a24082b4f590",
  "postal_address": {
    "address_line1": "1-3",
    "address_line2": "Strand",
    "city": "London",
    "state": "NSW",
    "post_code": "WC2N 5EH",
    "country_code": "GB",
    "verified": true
  },
  "geo_location": {
    "lat": 50.12345,
    "lng": -1.23456
  }
}
'
{
  "id": "loc_641b90b758fb8e6293716e40",
  "object": "location",
  "live_mode": true,
  "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": "NSW",
    "post_code": "WC2N 5EH",
    "country_code": "GB"
  },
  "geo_location": {
    "lat": 50.12345,
    "lng": -1.23456
  },
  "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"
  },
  "tariffs": [
    {
      "tariff_id": "trf_66ba584eb6923d7c3b942ef6",
      "location_id": "loc_641b90b758fb8e6293716e40",
      "type": "COMMODITY",
      "direction": "IMPORT",
      "status": "CONNECTED",
      "connection_type": "DIRECT",
      "display_name": "Agile Octopus v3 2024",
      "is_temporary": true,
      "provider": {
        "id": "prv_63a6087272921ef075a8fd3e",
        "display_name": "Octopus Energy",
        "logo_url": "https://s.flatpeak.com/83b06a60e38c2.png"
      }
    }
  ],
  "devices": [
    "dev_63a6087272941ef077a8fd3e"
  ]
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

location_id
string
required

Flatpeak Location ID

Body

application/json

This object represents a supply address.

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"

postal_address
PostalAddressCreate · 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.

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.

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.

consents
Consents · object
tariffs
TariffElement · object[]
devices
string[]

An array of Flatpeak Device IDs associated with this Location.