POST
/
vehicles
/
{vehicle}
/
attach
curl --request POST \
  --url https://api.chargeapi.co/v1/vehicles/{vehicle}/attach \
  --header 'Content-Type: application/json' \
  --data '{
  "driver": "<string>",
  "fleet": "<string>"
}'
{
  "id": null,
  "object": null,
  "battery_capacity": null,
  "charging_standard": null,
  "created": null,
  "drivers": null,
  "fleet": null,
  "information": {
    "make": null,
    "model": null,
    "year": null
  },
  "metadata": null,
  "registration_plate": null,
  "status": null,
  "telemetry": null,
  "updated": null,
  "vin": null
}

Path Parameters

vehicle
string
required

The unique identifier for the Vehicle to attach.

Body

application/json

Response

200
application/json

Returns the updated Vehicle object with the new attachment. If the Vehicle or target driver or fleet does not exist, an error is returned.