Upload a vehicle image
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/vehicles/{vehicleId}/image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image=@example-fileconst form = new FormData();
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://partners.chargeexpressltd.com/api/public/v1/vehicles/{vehicleId}/image', 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/vehicles/{vehicleId}/image"
files = { "image": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"object": "vehicle",
"id": "<string>",
"registration_number": "<string>",
"vin": "<string>",
"asset_tag": "<string>",
"status": "active",
"vehicle_type_id": 123,
"vehicle_model_id": 123,
"brand": "<string>",
"model": "<string>",
"description": "<string>",
"image_url": "<string>",
"driver_id": "<string>",
"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>"
}
}Vehicles
Upload a vehicle image
Requires the vehicles:write scope.
POST
/
vehicles
/
{vehicleId}
/
image
Upload a vehicle image
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/vehicles/{vehicleId}/image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image=@example-fileconst form = new FormData();
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://partners.chargeexpressltd.com/api/public/v1/vehicles/{vehicleId}/image', 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/vehicles/{vehicleId}/image"
files = { "image": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"object": "vehicle",
"id": "<string>",
"registration_number": "<string>",
"vin": "<string>",
"asset_tag": "<string>",
"status": "active",
"vehicle_type_id": 123,
"vehicle_model_id": 123,
"brand": "<string>",
"model": "<string>",
"description": "<string>",
"image_url": "<string>",
"driver_id": "<string>",
"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:
vehicle Available options:
active, maintenance, inactive, retired 
