EMP: Search → Book Flow
This guide walks through the complete flow: search for chargers, create a booking with driver_token, and monitor it.
Step 1: Search for chargers
Find available chargers near the driver's location:
curl -s "https://api.petitmonde.energy/api/v1/client/search?\
lat=48.1351&lng=11.5820&radius=25&connector_type=IEC_62196_T2_COMBO&power_min=50" \
-H "X-API-Key: YOUR_API_KEY" | jq .
Parameters:
lat,lng— Driver's GPS coordinatesradius— Search radius in km (default: 50, max: 200)connector_type— Filter by plug type (optional)power_min— Minimum power in kW (optional)
Key fields in the response:
results[].location_id— You'll need this for bookingresults[].evses[].evse_uid— Specific charger to bookresults[].evses[].status— Must beAVAILABLEresults[].supports_reservation— Must betrue
Step 2: Display results to driver
Show the driver:
- Location name, address, distance
- Available EVSEs with connector type and power
- Estimated price (from
pricing.estimated_price) - Whether reservation is supported
Step 3: Create a booking
When the driver selects a charger and time:
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",
"connector_id": "1",
"reservation_start": "2026-02-10T14:00:00Z",
"reservation_end": "2026-02-10T16:00:00Z",
"external_id": "driver-123-session-456",
"token_strategy": "driver_token",
"customer_id": "cust_abc123"
}' | jq .
Required fields for driver_token:
location_id,evse_uid— From the search resultreservation_start,reservation_end— ISO 8601, must be at least 15 min in the futurecustomer_idortoken_id— Identifies which driver token to use
The response returns the booking in REQUESTED status.
Step 4: Poll for confirmation
curl -s https://api.petitmonde.energy/api/v1/client/bookings/BOOKING_ID \
-H "X-API-Key: YOUR_API_KEY" | jq '{status, cpo_reservation_id}'
Poll every 5–10 seconds until status changes from REQUESTED to CONFIRMED (or EXPIRED if the CPO doesn't respond).
Once confirmed, the driver can navigate to the charger. Their existing RFID card or app token will work — it's already synced to the CPO.
Step 5: Handle the outcome
| Status | Action |
|---|---|
CONFIRMED | Show the driver the reservation details and charger location |
ATTENDING | Vehicle detected — charging is about to start |
COMPLETED | Session finished — show final price if available |
EXPIRED | CPO didn't respond — suggest trying another charger |
NO_SHOW | Driver didn't arrive — may incur a fee |
Error Handling
| Code | Meaning | Action |
|---|---|---|
400 | Invalid parameters | Check request body, dates must be in the future |
404 | Location/EVSE not found | Location may have been removed, re-search |
409 | EVSE not available | Time slot taken, try another EVSE or time |
429 | Rate limited | Read Retry-After header, wait and retry |