Zero Driver Balance

POST/v1/drivers/zero-balance

Returns a driver's entire sub-wallet balance to your fleet's wallet, atomically. This is the reverse of Distribute to Driver. To do this automatically for every driver each night, see Set Fleet Auto-Zero.

The whole balance is always returned; there's no partial amount. This includes any part of the balance that came from a driver's sign-up credit. It also works for a driver you've removed, so you can recover what they had left.

Auth

Authorization: ApiKey <your fleet's API key> — server-side only.

Request parameters

FieldTypeRequiredDescription
driverEmailstringYesWhich driver's balance to return to the fleet wallet.

Example request

curl https://api.lotgrids.com/v1/drivers/zero-balance \
  -X POST \
  -H "Authorization: ApiKey lg_live_f_8f21a9.9c2e1b7a..." \
  -H "Content-Type: application/json" \
  -d '{
    "driverEmail": "adaeze.driver@fleetco.com"
  }'

Example success response

200 OK
{
  "amountReturned": 12000,
  "fleetBalance": 142000,
  "driverBalance": 0
}

This call is safe to retry. If the driver's balance is already zero, you get a 200 with amountReturned: 0 and nothing changes.

What to expect

Error responses

400 invalid_argument
{ "error": { "code": "invalid_argument", "message": "driverEmail is required." } }
404 driver_not_found
{ "error": { "code": "driver_not_found", "message": "No driver adaeze.driver@fleetco.com in fleet f_8f21a9." } }