Skip to content

Locations

List Locations

Returns all locations belonging to your account.

GET https://api.hedgehogapplications.nl/v1/locations

Example

curl -H "X-API-Key: hh_live_a1b2c3d4e5f6..." \
  https://api.hedgehogapplications.nl/v1/locations
response = requests.get(f"{BASE_URL}/locations", headers=headers)
locations = response.json()

for location in locations["data"]:
    print(f"{location['name']} ({location['id']})")
const response = await fetch(`${BASE_URL}/locations`, {
  headers: { "X-API-Key": API_KEY },
});
const { data: locations } = await response.json();

locations.forEach((loc) => console.log(`${loc.name} (${loc.id})`));

Response

{
  "data": [
    {
      "id": "2725e8b0-0667-11f1-a8a4-2bf9576f784e",
      "name": "Amsterdam HQ",
      "label": "Amsterdam Headquarters"
    },
    {
      "id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
      "name": "Rotterdam Plant",
      "label": "Rotterdam Plant"
    }
  ]
}
Field Type Description
id string Unique location identifier (UUID)
name string Location name
label string Human-friendly label

List Energy Meters at Location

Returns all energy meters at a specific location.

GET https://api.hedgehogapplications.nl/v1/locations/:locationId/energy-meters
Parameter Description
locationId UUID of the location *

Example

curl -H "X-API-Key: hh_live_a1b2c3d4e5f6..." \
  https://api.hedgehogapplications.nl/v1/locations/2725e8b0-0667-11f1-a8a4-2bf9576f784e/energy-meters
location_id = "2725e8b0-0667-11f1-a8a4-2bf9576f784e"
response = requests.get(
    f"{BASE_URL}/locations/{location_id}/energy-meters",
    headers=headers,
)
meters = response.json()
const locationId = "2725e8b0-0667-11f1-a8a4-2bf9576f784e";
const response = await fetch(
  `${BASE_URL}/locations/${locationId}/energy-meters`,
  { headers: { "X-API-Key": API_KEY } },
);
const { data: meters } = await response.json();

Response

{
  "data": [
    {
      "id": "5aa268e0-0666-11f1-a8a4-2bf9576f784e",
      "name": "Grid Main Connection Meter",
      "label": "Grid Meter"
    },
    {
      "id": "ef307b60-10ab-11f1-9f49-a551b1a09652",
      "name": "AC Fast Charger 1 Meter",
      "label": "Charger 1 Meter"
    }
  ]
}
Field Type Description
id string Unique energy meter identifier (UUID)
name string Meter name
label string Human-friendly label