Skip to main content
POST
/
drivers
/
{driver}
/
attach
Attach a driver to a fleet
curl --request POST \
  --url https://api.chargeapi.co/v1/drivers/{driver}/attach \
  --header 'Content-Type: application/json' \
  --data '{
  "fleet": "<string>"
}'
{
  "id": null,
  "object": null,
  "created": null,
  "email": null,
  "fleets": null,
  "license_number": null,
  "name": null,
  "phone": null,
  "preferences": {
    "charging_speed": null,
    "currency": null,
    "default_payment_method": null,
    "max_price_per_kwh": null,
    "notifications": null,
    "preferred_charging_stations": null,
    "preferred_cpos": null
  },
  "status": null,
  "updated": null,
  "vehicles": null,
  "wallet_balance": null
}

Path Parameters

driver
string
required

ID of the driver who will operate the fleet.

Body

application/json
fleet
string
required

ID of the fleet to attach the Driver to.

Response

Returns the updated Driver object with the new fleet ID attached to.

id
string

Unique identifier for the driver object.

Example:

null

object
string

String representing the object’s type. Always driver.

Example:

null

created
integer

Time at which the driver was created (UNIX timestamp).

Example:

null

email
string

Email address used for login and notifications.

Example:

null

fleets
string[]

List of fleet IDs currently linked to the driver.

Example:

null

license_number
string | null

Driver’s license number, if applicable.

Example:

null

name
string

Full name of the driver.

Example:

null

phone
string | null

Optional phone number for communication and account recovery.

Example:

null

preferences
object

Driver’s personal preferences for charging experience and routing.

status
enum<string>

Current status of the driver account.

Available options:
active,
suspended,
archived
Example:

null

updated
integer

Time at which the driver object was last updated.

Example:

null

vehicles
string[]

List of vehicle IDs currently linked to the driver.

Example:

null

wallet_balance
integer

Driver’s wallet or prepaid balance in the smallest currency unit (e.g., cents).

Example:

null