Update a driver
curl --request PATCH \
--url https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employee_id: '<string>',
license_number: '<string>',
license_expires_at: '<string>'
})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}"
payload = {
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "driver",
"id": "<string>",
"status": "active",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "2023-12-25",
"photo_url": "<string>",
"vehicle_ids": [
"<string>"
],
"profile": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Drivers
Update a driver
Suspend or reactivate a driver, or change their employee id and licence.
Requires the drivers:write scope.
PATCH
/
drivers
/
{driverId}
Update a driver
curl --request PATCH \
--url https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employee_id: '<string>',
license_number: '<string>',
license_expires_at: '<string>'
})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}"
payload = {
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "driver",
"id": "<string>",
"status": "active",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"employee_id": "<string>",
"license_number": "<string>",
"license_expires_at": "2023-12-25",
"photo_url": "<string>",
"vehicle_ids": [
"<string>"
],
"profile": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Your fleet API key, e.g. Authorization: Bearer cxk_live_…. Create keys in the fleet portal under Developers.
Path Parameters
Body
application/json
Response
Success
Available options:
driver Available options:
active, suspended, pending, archived Show child attributes
Show child attributes

