Upload a driver photo
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}/photo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form photo=@example-fileconst form = new FormData();
form.append('photo', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}/photo', 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}/photo"
files = { "photo": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, 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
Upload a driver photo
Requires the drivers:write scope.
POST
/
drivers
/
{driverId}
/
photo
Upload a driver photo
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}/photo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form photo=@example-fileconst form = new FormData();
form.append('photo', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://partners.chargeexpressltd.com/api/public/v1/drivers/{driverId}/photo', 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}/photo"
files = { "photo": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, 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
multipart/form-data
JPG, PNG or WebP, up to 5 MB
Response
Success
Available options:
driver Available options:
active, suspended, pending, archived Show child attributes
Show child attributes

