Skip to main content

Corporate Usage & Reporting

Tracking Employee Charging

Convention for external_id

Use a structured external_id to make reporting easy:

{department}-{employee_id}-{date}

Example: engineering-emp042-20260210

This lets you filter and group bookings by department or employee.

Creating bookings with tracking

curl -s -X POST https://api.petitmonde.energy/api/v1/client/bookings \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location_id": "DE-ENB-E123456",
"evse_uid": "DE*ENB*E123456*1",
"reservation_start": "2026-02-10T08:00:00Z",
"reservation_end": "2026-02-10T10:00:00Z",
"external_id": "engineering-emp042-20260210",
"token_strategy": "driver_token",
"customer_id": "cust_emp042"
}' | jq .

Generating Reports

Monthly summary

Fetch all completed bookings for the month:

curl -s "https://api.petitmonde.energy/api/v1/client/bookings?\
status=COMPLETED&from_date=2026-02-01T00:00:00Z&to_date=2026-02-28T23:59:59Z&limit=100" \
-H "X-API-Key: YOUR_API_KEY" | jq '[.bookings[] | {
external_id,
price: .client_price,
city: .location_city,
date: .created_at
}]'

Department breakdown

Parse the external_id in your backend to group by department:

import requests
from collections import defaultdict

response = requests.get(
"https://api.petitmonde.energy/api/v1/client/bookings",
headers={"X-API-Key": API_KEY},
params={
"status": "COMPLETED",
"from_date": "2026-02-01T00:00:00Z",
"to_date": "2026-02-28T23:59:59Z",
"limit": 100,
},
)

dept_totals = defaultdict(float)
for booking in response.json()["bookings"]:
dept = booking["external_id"].split("-")[0]
dept_totals[dept] += booking["client_price"]

for dept, total in sorted(dept_totals.items()):
print(f"{dept}: EUR {total:.2f}")

Guest Charging for Visitors

For visitor parking chargers, use ad_hoc:

curl -s -X POST https://api.petitmonde.energy/api/v1/client/bookings \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location_id": "DE-ENB-E123456",
"evse_uid": "DE*ENB*E123456*1",
"reservation_start": "2026-02-10T09:00:00Z",
"reservation_end": "2026-02-10T17:00:00Z",
"external_id": "visitor-reception-20260210",
"token_strategy": "ad_hoc"
}' | jq .

Best Practices

  • Set up monthly automated reports to finance/HR
  • Monitor per-employee usage for anomalies
  • Use structured external_id from day one — retrofitting is painful
  • Consider setting per-employee monthly caps in your backend