Vai al contenuto
Riferimento API

Geräte

9 endpoint

Le descrizioni degli endpoint provengono direttamente dall'API e sono in tedesco.

Geräte auflisten

get/v1/devices

Ladepunkte mit aktuellem Zustand, Tarif, Abrechnungsmodell und QR-Code-URL.

Parametri

NomePosizioneTipo
location_idfacoltativoQuerystring
kindfacoltativoQuerystring

Risposta 200DeviceList

NomeTipoDescrizione
objectobbligatorio"list"
dataobbligatorioDevice[]
has_moreobbligatorioboolean

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X GET https://api.ladehase.com/v1/devices \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{
  "object": "list",
  "data": [
    {
      "id": "dev_7d3a9c1b0e2f4a6b",
      "object": "device",
      "kind": "string",
      "livemode": true,
      "name": "Ladepunkt Scheune",
      "location_id": "string",
      "integration_id": "string",
      "manufacturer": "string",
      "model": "string",
      "serial_number": "string",
      "max_power_w": 0,
      "tariff_id": "string",
      "billing": {},
      "enabled": true,
      "locked": true,
      "prepared": true,
      "status": "string",
      "state": {
        "online": true,
        "status": "string",
        "cable_plugged": true,
        "power_w": 0,
        "meter_wh": 0,
        "authorization_required": true,
        "last_seen_at": "2026-10-25T08:30:00.000Z",
        "error": "string"
      },
      "active_session_id": "string",
      "connectors": [
        {
          "id": "string",
          "code": "string",
          "url": "string"
        }
      ],
      "created_at": "string"
    }
  ],
  "has_more": true
}

Gerät abrufen

get/v1/devices/{id}

Ein Gerät mit Zustand.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring

Risposta 200Device

NomeTipoDescrizione
idobbligatoriostringID mit Präfix «dev_»
objectobbligatorio"device"
kindobbligatoriostringGeräteart, vorerst «ev_charger»
livemodeobbligatorioboolean
nameobbligatoriostring
location_idobbligatoriostring
integration_idobbligatoriostring | null
manufacturerobbligatoriostring | null
modelobbligatoriostring | null
serial_numberobbligatoriostring | null
max_power_wobbligatoriointeger | null
tariff_idobbligatoriostring | null
billingobbligatorioobjectAbrechnungsmodell, Reservationsgrenzen, Pakete
enabledobbligatoriobooleanVon Ladehase verwaltet und für Fahrende freigegeben
lockedobbligatoriobooleanVorübergehend gesperrt (keine neuen Ladungen)
preparedobbligatorioboolean«Autorisierung erforderlich» beim Hersteller gesetzt
statusobbligatoriostringZusammengefasster Status für Anzeigen
stateobbligatorioDeviceState
active_session_idobbligatoriostring | null
connectorsobbligatorioobject[]
created_atobbligatoriostring

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X GET https://api.ladehase.com/v1/devices/{id} \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{
  "id": "dev_7d3a9c1b0e2f4a6b",
  "object": "device",
  "kind": "string",
  "livemode": true,
  "name": "Ladepunkt Scheune",
  "location_id": "string",
  "integration_id": "string",
  "manufacturer": "string",
  "model": "string",
  "serial_number": "string",
  "max_power_w": 0,
  "tariff_id": "string",
  "billing": {},
  "enabled": true,
  "locked": true,
  "prepared": true,
  "status": "string",
  "state": {
    "online": true,
    "status": "string",
    "cable_plugged": true,
    "power_w": 0,
    "meter_wh": 0,
    "authorization_required": true,
    "last_seen_at": "2026-10-25T08:30:00.000Z",
    "error": "string"
  },
  "active_session_id": "string",
  "connectors": [
    {
      "id": "string",
      "code": "string",
      "url": "string"
    }
  ],
  "created_at": "string"
}

Gerät ändern

patch/v1/devices/{id}

Name, Standort, Tarif, Abrechnungsmodell (reservation, prepaid, both), Reservationsgrenzen, Pakete. `enabled: true` aktiviert das Gerät und setzt beim Hersteller «Autorisierung erforderlich».

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring

Richiesta

NomeTipoDescrizione
namefacoltativostring
location_idfacoltativostring
tariff_idfacoltativostring | null
billingfacoltativoobject
enabledfacoltativoboolean

Risposta 200Device

NomeTipoDescrizione
idobbligatoriostringID mit Präfix «dev_»
objectobbligatorio"device"
kindobbligatoriostringGeräteart, vorerst «ev_charger»
livemodeobbligatorioboolean
nameobbligatoriostring
location_idobbligatoriostring
integration_idobbligatoriostring | null
manufacturerobbligatoriostring | null
modelobbligatoriostring | null
serial_numberobbligatoriostring | null
max_power_wobbligatoriointeger | null
tariff_idobbligatoriostring | null
billingobbligatorioobjectAbrechnungsmodell, Reservationsgrenzen, Pakete
enabledobbligatoriobooleanVon Ladehase verwaltet und für Fahrende freigegeben
lockedobbligatoriobooleanVorübergehend gesperrt (keine neuen Ladungen)
preparedobbligatorioboolean«Autorisierung erforderlich» beim Hersteller gesetzt
statusobbligatoriostringZusammengefasster Status für Anzeigen
stateobbligatorioDeviceState
active_session_idobbligatoriostring | null
connectorsobbligatorioobject[]
created_atobbligatoriostring

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X PATCH https://api.ladehase.com/v1/devices/{id} \n  -H "Authorization: Bearer lh_test_…" \n  -H "Content-Type: application/json" \n  -d '{"name":"string","location_id":"string","tariff_id":"string","billing":{"model":"reservation","reservationDefault":3000,"reservationMin":1000,"reservationMax":10000,"safetyMarginBps":300,"packages":[],"prepaidRemainder":"refund","plugTimeoutMinutes":10,"maxDurationMinutes":1440},"enabled":true}'
Risposta 200
{
  "id": "dev_7d3a9c1b0e2f4a6b",
  "object": "device",
  "kind": "string",
  "livemode": true,
  "name": "Ladepunkt Scheune",
  "location_id": "string",
  "integration_id": "string",
  "manufacturer": "string",
  "model": "string",
  "serial_number": "string",
  "max_power_w": 0,
  "tariff_id": "string",
  "billing": {},
  "enabled": true,
  "locked": true,
  "prepared": true,
  "status": "string",
  "state": {
    "online": true,
    "status": "string",
    "cable_plugged": true,
    "power_w": 0,
    "meter_wh": 0,
    "authorization_required": true,
    "last_seen_at": "2026-10-25T08:30:00.000Z",
    "error": "string"
  },
  "active_session_id": "string",
  "connectors": [
    {
      "id": "string",
      "code": "string",
      "url": "string"
    }
  ],
  "created_at": "string"
}

Zustand abfragen

get/v1/devices/{id}/state

Aktueller Zustand. Mit `refresh=true` wird beim Hersteller nachgefragt.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
refreshfacoltativoQueryboolean | null

Risposta 200DeviceState

NomeTipoDescrizione
onlinefacoltativoboolean
statusfacoltativostringoffline, available, vehicle_connected, awaiting_authorization, charging, suspended, finished, error
cable_pluggedfacoltativoboolean
power_wfacoltativointegerAktuelle Leistung in Watt
meter_whfacoltativointeger | nullZählerstand in Wh
authorization_requiredfacoltativoboolean | null
last_seen_atfacoltativostring | nullZeitpunkt (ISO 8601, UTC)
errorfacoltativostring | null

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X GET https://api.ladehase.com/v1/devices/{id}/state \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{
  "online": true,
  "status": "string",
  "cable_plugged": true,
  "power_w": 0,
  "meter_wh": 0,
  "authorization_required": true,
  "last_seen_at": "2026-10-25T08:30:00.000Z",
  "error": "string"
}

Ladung ohne Zahlung starten

post/v1/devices/{id}/start

Gibt den Ladepunkt ohne Zahlung frei (z. B. eigenes Auto). Ladehase legt dafür eine Gratis-Sitzung an, damit die Energie erfasst wird.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Intestazionestring

Risposta 201Session

NomeTipoDescrizione
idobbligatoriostringID mit Präfix «ses_»
objectobbligatorio"session"
livemodeobbligatorioboolean
stateobbligatoriostringZustand gemäss Zustandsautomat (created … settled)
modeobbligatorio"reservation" | "prepaid" | "access"
channelobbligatorio"qr" | "terminal" | "api" | "rfid" | "access_link"
location_idobbligatoriostring
device_idobbligatoriostring
connector_idobbligatoriostring
currencyobbligatoriostring
authorized_amountobbligatoriointegerReservierter beziehungsweise bezahlter Betrag in Rappen
amountobbligatoriointegerHochgerechneter Betrag (laufend) oder Endbetrag in Rappen
captured_amountobbligatoriointegerBelasteter Betrag in Rappen
refunded_amountobbligatoriointegerZurückerstatteter Betrag in Rappen
vat_amountobbligatoriointegerMWST-Anteil in Rappen
energy_whobbligatoriointegerGeladene Energie in Wh
idle_minutesobbligatoriointeger
stop_reasonobbligatoriostring | null
receipt_numberobbligatoriostring | null
started_atobbligatoriostring | nullZeitpunkt (ISO 8601, UTC)
ended_atobbligatoriostring | nullZeitpunkt (ISO 8601, UTC)
settled_atobbligatoriostring | nullZeitpunkt (ISO 8601, UTC)
created_atobbligatoriostring

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X POST https://api.ladehase.com/v1/devices/{id}/start \n  -H "Authorization: Bearer lh_test_…"
Risposta 201
{
  "id": "ses_1a2b3c4d5e6f7a8b9c0d",
  "object": "session",
  "livemode": true,
  "state": "string",
  "mode": "reservation",
  "channel": "qr",
  "location_id": "string",
  "device_id": "string",
  "connector_id": "string",
  "currency": "string",
  "authorized_amount": 1235,
  "amount": 1235,
  "captured_amount": 1235,
  "refunded_amount": 1235,
  "vat_amount": 1235,
  "energy_wh": 0,
  "idle_minutes": 0,
  "stop_reason": "string",
  "receipt_number": "string",
  "started_at": "2026-10-25T08:30:00.000Z",
  "ended_at": "2026-10-25T08:30:00.000Z",
  "settled_at": "2026-10-25T08:30:00.000Z",
  "created_at": "string"
}

Ladung am Gerät stoppen

post/v1/devices/{id}/stop

Stoppt die laufende Sitzung des Geräts und rechnet ab. Ohne Sitzung wird nur der Stoppbefehl gesendet.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Intestazionestring

Risposta 200Object

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X POST https://api.ladehase.com/v1/devices/{id}/stop \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{}

Gerät sperren

post/v1/devices/{id}/lock

Keine neuen Ladungen, laufende Ladung läuft weiter.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Intestazionestring

Risposta 200Device

NomeTipoDescrizione
idobbligatoriostringID mit Präfix «dev_»
objectobbligatorio"device"
kindobbligatoriostringGeräteart, vorerst «ev_charger»
livemodeobbligatorioboolean
nameobbligatoriostring
location_idobbligatoriostring
integration_idobbligatoriostring | null
manufacturerobbligatoriostring | null
modelobbligatoriostring | null
serial_numberobbligatoriostring | null
max_power_wobbligatoriointeger | null
tariff_idobbligatoriostring | null
billingobbligatorioobjectAbrechnungsmodell, Reservationsgrenzen, Pakete
enabledobbligatoriobooleanVon Ladehase verwaltet und für Fahrende freigegeben
lockedobbligatoriobooleanVorübergehend gesperrt (keine neuen Ladungen)
preparedobbligatorioboolean«Autorisierung erforderlich» beim Hersteller gesetzt
statusobbligatoriostringZusammengefasster Status für Anzeigen
stateobbligatorioDeviceState
active_session_idobbligatoriostring | null
connectorsobbligatorioobject[]
created_atobbligatoriostring

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X POST https://api.ladehase.com/v1/devices/{id}/lock \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{
  "id": "dev_7d3a9c1b0e2f4a6b",
  "object": "device",
  "kind": "string",
  "livemode": true,
  "name": "Ladepunkt Scheune",
  "location_id": "string",
  "integration_id": "string",
  "manufacturer": "string",
  "model": "string",
  "serial_number": "string",
  "max_power_w": 0,
  "tariff_id": "string",
  "billing": {},
  "enabled": true,
  "locked": true,
  "prepared": true,
  "status": "string",
  "state": {
    "online": true,
    "status": "string",
    "cable_plugged": true,
    "power_w": 0,
    "meter_wh": 0,
    "authorization_required": true,
    "last_seen_at": "2026-10-25T08:30:00.000Z",
    "error": "string"
  },
  "active_session_id": "string",
  "connectors": [
    {
      "id": "string",
      "code": "string",
      "url": "string"
    }
  ],
  "created_at": "string"
}

Gerät entsperren

post/v1/devices/{id}/unlock

Hebt die Sperre auf.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Intestazionestring

Risposta 200Device

NomeTipoDescrizione
idobbligatoriostringID mit Präfix «dev_»
objectobbligatorio"device"
kindobbligatoriostringGeräteart, vorerst «ev_charger»
livemodeobbligatorioboolean
nameobbligatoriostring
location_idobbligatoriostring
integration_idobbligatoriostring | null
manufacturerobbligatoriostring | null
modelobbligatoriostring | null
serial_numberobbligatoriostring | null
max_power_wobbligatoriointeger | null
tariff_idobbligatoriostring | null
billingobbligatorioobjectAbrechnungsmodell, Reservationsgrenzen, Pakete
enabledobbligatoriobooleanVon Ladehase verwaltet und für Fahrende freigegeben
lockedobbligatoriobooleanVorübergehend gesperrt (keine neuen Ladungen)
preparedobbligatorioboolean«Autorisierung erforderlich» beim Hersteller gesetzt
statusobbligatoriostringZusammengefasster Status für Anzeigen
stateobbligatorioDeviceState
active_session_idobbligatoriostring | null
connectorsobbligatorioobject[]
created_atobbligatoriostring

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X POST https://api.ladehase.com/v1/devices/{id}/unlock \n  -H "Authorization: Bearer lh_test_…"
Risposta 200
{
  "id": "dev_7d3a9c1b0e2f4a6b",
  "object": "device",
  "kind": "string",
  "livemode": true,
  "name": "Ladepunkt Scheune",
  "location_id": "string",
  "integration_id": "string",
  "manufacturer": "string",
  "model": "string",
  "serial_number": "string",
  "max_power_w": 0,
  "tariff_id": "string",
  "billing": {},
  "enabled": true,
  "locked": true,
  "prepared": true,
  "status": "string",
  "state": {
    "online": true,
    "status": "string",
    "cable_plugged": true,
    "power_w": 0,
    "meter_wh": 0,
    "authorization_required": true,
    "last_seen_at": "2026-10-25T08:30:00.000Z",
    "error": "string"
  },
  "active_session_id": "string",
  "connectors": [
    {
      "id": "string",
      "code": "string",
      "url": "string"
    }
  ],
  "created_at": "string"
}

Testgerät steuern

post/v1/devices/{id}/simulate

Nur Testmodus: simuliertes Auto anstecken (`plug`), abziehen (`unplug`), offline, Störung, Leistung ändern.

Parametri

NomePosizioneTipo
idobbligatorioPercorsostring
idempotency-keyfacoltativoWiederholbare Anfragen ohne doppelte Wirkung (24 Stunden)Intestazionestring

Richiesta

NomeTipoDescrizione
actionobbligatorio"plug" | "unplug" | "offline" | "online" | "error" | "clear_error" | "set_power"
vehicle_need_whfacoltativointeger
power_wfacoltativointeger

Risposta 200DeviceState

NomeTipoDescrizione
onlinefacoltativoboolean
statusfacoltativostringoffline, available, vehicle_connected, awaiting_authorization, charging, suspended, finished, error
cable_pluggedfacoltativoboolean
power_wfacoltativointegerAktuelle Leistung in Watt
meter_whfacoltativointeger | nullZählerstand in Wh
authorization_requiredfacoltativoboolean | null
last_seen_atfacoltativostring | nullZeitpunkt (ISO 8601, UTC)
errorfacoltativostring | null

Errori possibili

  • 400 Anfrage ungültig
  • 401 Nicht angemeldet
  • 403 Berechtigung fehlt
  • 404 Nicht gefunden
  • 409 Zustand passt nicht
  • 429 Zu viele Anfragen
Esempio
curl -X POST https://api.ladehase.com/v1/devices/{id}/simulate \n  -H "Authorization: Bearer lh_test_…" \n  -H "Content-Type: application/json" \n  -d '{"action":"plug","vehicle_need_wh":0,"power_w":0}'
Risposta 200
{
  "online": true,
  "status": "string",
  "cable_plugged": true,
  "power_w": 0,
  "meter_wh": 0,
  "authorization_required": true,
  "last_seen_at": "2026-10-25T08:30:00.000Z",
  "error": "string"
}