Skip to main content
POST
/
locations
Create a location
curl --request POST \
  --url https://api.flatpeak.com/locations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reference_id": "LOC1234567890",
  "customer_id": "cus_65e421d1daa4a24082b4f590",
  "grid_node_id": "01459223",
  "postal_address": {
    "address_line1": "1-3",
    "address_line2": "Strand",
    "city": "London",
    "state": "NSW",
    "post_code": "WC2N 5EH",
    "country_code": "GB"
  }
}
'
{
  "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",
  "grid_node_id": "01459223",
  "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
  },
  "tariff_status": {
    "commodity_import": "CONNECTED",
    "commodity_export": "ERROR",
    "non_commodity_import": "NOT_CONNECTED",
    "non_commodity_export": "NOT_SUPPORTED",
    "local": "NOT_SUPPORTED"
  },
  "tariff_elements": [
    "trf_66ba584eb6923d7c3b942ef6"
  ]
}

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.

Authorizations

Authorization
string
header
required

Authenticate with bearer_token you obtained from /login endpoint.

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"

grid_node_id
string

Utility provided identifier for the grid segment (e.g. circuit or feeder), used for location specific pricing and signals.

Note, this parameter is in preview and not generally available. Contact support@flatpeak.com to enable it.

Example:

"01459223"

postal_address
PostalAddress · object

Information on the postal address.

Response

Example response

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"

grid_node_id
string

Utility provided identifier for the grid segment (e.g. circuit or feeder), used for location specific pricing and signals.

Note, this parameter is in preview and not generally available. Contact support@flatpeak.com to enable it.

Example:

"01459223"

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.

tariff_status
object

Health status of tariff elements.

tariff_elements
string[]

An array of tariff IDs that apply to this location. To manage tariffs for a location, use the tariffs-elements endpoint. NOTE: This field is in beta and is not currently generally supported. Check back in early September 2024.