Skip to main content
curl -G https://api.chargeapi.co/v1/reservations/res_nfJiRR1ok35nSfnIpS4tC7SAsUk0K3As \
  -H "Authorization: Bearer ch_sk_test_..." \
  -d expand=driver \
  -d expand=vehicle.fleet
{
    "id": "res_nfJiRR1ok35nSfnIpS4tC7SAsUk0K3As",
    "object": "reservation",
    "charging_station": "chst_AwAMEuLnH0Umz3DhtEjEaHACtMcscDDY",
    "driver": {
        "id": "drv_OAVzBPkaauGK3svjp2YxHyGkZxPjIuSB",
        "object": "driver"
        // ...
    },
    "payment_method": "pm_ifwG4OMNnEmqjpi7cP8EJvxiRZAzGOEX",
    "status": "confirmed",
    "vehicle": {
        "id": "veh_O3C7oq0HKOkNlpzokFN5eTTVWImdeLKy",
        "object": "vehicle",
        "fleet": {
            "id": "flt_nnMosKd4naheDFTiLmLhZ3Yw64xg9enI",
            "object": "fleet"
            // ...
        }
        // ...
    }
    // ...
}
Many Charge objects allow related resources to be expanded inline by using the expand query parameter. By default, expandable fields are returned as IDs. Adding expand tells Charge to replace those IDs with full objects in the same response, which is useful when you already know which related records your client needs. To expand more than one relation, repeat expand once per path. That can include nested paths such as vehicle.fleet when that relation chain is supported. The exact values you can use depend on the object returned by that endpoint, and they are listed on the relevant object pages and endpoint references. If you send a path that is not supported, Charge returns unsupported_expand_value.
Use expand, not expand[].

Where expansion is available

Returned objectAllowed expand values
Accountpreferences.default_payment_method
Charging Sessioncharging_station, driver, fleet, payment_method, vehicle
Driverpreferences.default_payment_method
Estimationcharging_station, vehicle
Fleetpreferences.default_payment_method
Payment Methoddriver, fleet
Reportaccount, fleet
Reservationcharging_station, driver, payment_method, vehicle
Transactioncharging_session, driver, payment_method, vehicle
Vehiclefleet, telemetry
Vehicle Telemetryvehicle