Skip to main content

Code Examples

Complete examples for the most common API operations.

Search for Chargers

curl -s "https://api.petitmonde.energy/api/v1/client/search?\
lat=52.52&lng=13.40&radius=25&connector_type=IEC_62196_T2_COMBO&limit=5" \
-H "X-API-Key: $API_KEY" | jq .

Create a Booking

curl -s -X POST https://api.petitmonde.energy/api/v1/client/bookings \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location_id": "DE-ENB-E123456",
"evse_uid": "DE*ENB*E123456*1",
"connector_id": "1",
"reservation_start": "2026-02-10T14:00:00Z",
"reservation_end": "2026-02-10T16:00:00Z",
"external_id": "my-ref-001"
}' | jq .

Check Booking Status

curl -s https://api.petitmonde.energy/api/v1/client/bookings/BOOKING_ID \
-H "X-API-Key: $API_KEY" | jq '{status, cpo_reservation_id, client_price}'

Cancel a Booking

curl -s -X POST https://api.petitmonde.energy/api/v1/client/bookings/BOOKING_ID/cancel \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "Plans changed"}' | jq .