Set the low-balance alert
curl --request PATCH \
--url https://partners.chargeexpressltd.com/api/public/v1/fleet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"low_balance_threshold_kwh": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({low_balance_threshold_kwh: '<string>'})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/fleet', 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/fleet"
payload = { "low_balance_threshold_kwh": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "fleet",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"contact_phone": "<string>",
"unit_price": "125.50",
"currency": "GHS",
"low_balance_threshold_kwh": "12.5000",
"created_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>"
}
}Fleet
Set the low-balance alert
Requires the wallet:write scope.
PATCH
/
fleet
Set the low-balance alert
curl --request PATCH \
--url https://partners.chargeexpressltd.com/api/public/v1/fleet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"low_balance_threshold_kwh": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({low_balance_threshold_kwh: '<string>'})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/fleet', 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/fleet"
payload = { "low_balance_threshold_kwh": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "fleet",
"id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"contact_phone": "<string>",
"unit_price": "125.50",
"currency": "GHS",
"low_balance_threshold_kwh": "12.5000",
"created_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.
Body
application/json
Response
Success
Available options:
fleet Available options:
active, inactive, pending, rejected GHS per kWh
Example:
"125.50"
Available options:
GHS wallet.low_balance fires below this
Example:
"12.5000"

