eTruck Range

API-Dokumentation (v1)

Betten Sie die eTruck-Range-Engine in Ihr TMS, Händlerportal oder Energieprodukt ein. Auth per Bearer-API-Key, Abrechnung pro erfolgreicher Simulation. Maschinenlesbare Spec: /v1/openapi.json.

Authentifizierung

Jeder Request braucht den Header Authorization: Bearer etr_live_…. Keys erstellen Sie unter Developer (Partner-Tarif). Der Secret wird genau einmal angezeigt.

Endpoints

POST/v1/simulationsEinzelsimulation · 1 Unit
POST/v1/simulations/batchbis 100 Touren · je erfolgreiches Item 1 Unit
GET/v1/vehiclesFahrzeugkatalog · kostenlos
GET/v1/usageKontingent · kostenlos
GET/v1/healthStatus + Modellversion · ohne Auth

Beispiel

curl -X POST https://etruck-range.de/v1/simulations \
  -H "Authorization: Bearer etr_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7f3c…" \
  -d '{
    "vehicleId": "mercedes-eactros-600",
    "environment": { "temperatureC": 0, "weather": "schnee" },
    "segments": [
      { "distanceKm": 45, "baseSpeedKmh": 60, "massKg": 32000,
        "uphillM": 200, "downhillM": 180,
        "roadSplit": { "autobahnKm": 30, "landstrasseKm": 10, "stadtKm": 5 } }
    ]
  }'

Antwort:

{
  "data": {
    "verdict": "feasible",
    "feasible": true,
    "finalSocPct": 63.2,
    "totalDistanceKm": 45,
    "totalConsumptionKwh": 71.4,
    "kwhPerKm": 1.59,
    "modelVersion": "1.0.0"
  }
}

Abrechnung & Limits

  • Partner-Tarif: 20.000 Simulationen/Monat inklusive, danach Overage pro Unit.
  • Nur erfolgreiche Simulationen zählen — 4xx/5xx/Validierungsfehler nicht.
  • Rate-Limit 300/min pro Key (Header RateLimit-*, bei 429 Retry-After).
  • Idempotency: Idempotency-Key-Header für sichere Retries auf POST.