Fleet API
Fleet drivers, vehicles, documents, assignments and dispatch.
Frontend integration guideUse the endpoint cards below as the source of truth for request methods, authentication and test payloads. Keep credentials in secure storage and send bearer tokens only over HTTPS.
Mutating requests should include a unique Idempotency-Key. Render API status and error codes explicitly, and refetch state after reconnecting.
REST response contractEvery response is JSON: { success, data, error }. When success is true, read data. When it is false, use error.code for app logic and error.message for safe UI text.
| HTTP | Meaning | Frontend action |
|---|
200 | Request succeeded. | Render data. |
201 | Resource created. | Persist its returned ID/state. |
202 | Accepted for asynchronous work. | Show pending; it is not authentication. |
400 | Invalid request or business rule. | Show error.message and field details. |
401 | Token missing, expired or invalid. | Refresh session or sign in. |
403 | Access denied. | Do not retry. |
404 | Unavailable or hidden resource. | Return safely and refresh state. |
409 | State conflict/duplicate/expired resource. | Refetch; do not blindly retry. |
422 | Semantically invalid input. | Highlight the field. |
429 | Rate limited. | Back off, respecting Retry-After. |
500 | Unexpected server failure. | Offer a safe retry. |
Stable codes: VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, TRIP_ACCESS_DENIED, RIDER_ACTION_RATE_LIMITED and OTP_RATE_LIMITED. Each endpoint guide adds any relevant business codes.
PATCH/api/v1/fleets/me/provider-code
Bearer token
Set the Fleet’s unique 3-letter driver-ID provider code
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/provider-code', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"providerCode":"ABC"})
});
const result = await response.json();Python
payload = json.loads(r'''{"providerCode":"ABC"}''')
response = requests.patch(BASE_URL + '/api/v1/fleets/me/provider-code',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"providerCode":"ABC"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/provider-code');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X PATCH '<base-url>/api/v1/fleets/me/provider-code' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"providerCode":"ABC"}'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/drivers
Bearer token
Create and invite a driver; returns CRZ-{CODE}-0001
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/drivers', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"firstName":"John","lastName":"Doe","phone":"+2348012345678","email":"john@example.com"})
});
const result = await response.json();Python
payload = json.loads(r'''{"firstName":"John","lastName":"Doe","phone":"+2348012345678","email":"john@example.com"}''')
response = requests.post(BASE_URL + '/api/v1/fleets/me/drivers',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"firstName":"John","lastName":"Doe","phone":"+2348012345678","email":"john@example.com"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/drivers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/drivers' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"firstName":"John","lastName":"Doe","phone":"+2348012345678","email":"john@example.com"}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me/drivers
Bearer token
List fleet drivers and assigned IDs
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/drivers', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me/drivers',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/drivers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me/drivers' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/drivers/:id/documents
Bearer token
Upload one driver compliance document (multipart)
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
This endpoint uses multipart/form-data. Send the selected image using the exact field name file; do not manually set the multipart Content-Type boundary.
Node.js
const form = new FormData();
form.append('onboardingToken', '<onboarding-token>');
form.append('file', fileInput.files[0]);
const response = await fetch('/api/v1/fleets/me/drivers/:id/documents', { method: 'POST', body: form });
const result = await response.json();Python
with open('profile.jpg', 'rb') as photo:
response = requests.post(BASE_URL + '/api/v1/fleets/me/drivers/:id/documents',
data={'onboardingToken': '<onboarding-token>'},
files={'file': ('profile.jpg', photo, 'image/jpeg')})
result = response.json()PHP
$payload = [
'onboardingToken' => '<onboarding-token>',
'file' => new CURLFile('/path/to/profile.jpg', 'image/jpeg'),
];
$ch = curl_init($baseUrl . '/api/v1/fleets/me/drivers/:id/documents');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/drivers/:id/documents' \
+ -F 'onboardingToken=<onboarding-token>' \
+ -F 'file=@/path/to/profile.jpg;type=image/jpeg'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/drivers/:id/documents/batch
Bearer token
Upload up to 10 driver documents in one request (multipart)
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
This endpoint uses multipart/form-data. Send the selected image using the exact field name file; do not manually set the multipart Content-Type boundary.
Node.js
const form = new FormData();
form.append('onboardingToken', '<onboarding-token>');
form.append('file', fileInput.files[0]);
const response = await fetch('/api/v1/fleets/me/drivers/:id/documents/batch', { method: 'POST', body: form });
const result = await response.json();Python
with open('profile.jpg', 'rb') as photo:
response = requests.post(BASE_URL + '/api/v1/fleets/me/drivers/:id/documents/batch',
data={'onboardingToken': '<onboarding-token>'},
files={'file': ('profile.jpg', photo, 'image/jpeg')})
result = response.json()PHP
$payload = [
'onboardingToken' => '<onboarding-token>',
'file' => new CURLFile('/path/to/profile.jpg', 'image/jpeg'),
];
$ch = curl_init($baseUrl . '/api/v1/fleets/me/drivers/:id/documents/batch');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/drivers/:id/documents/batch' \
+ -F 'onboardingToken=<onboarding-token>' \
+ -F 'file=@/path/to/profile.jpg;type=image/jpeg'
Response —
Run the request to see the response.
PATCH/api/v1/fleets/me/drivers/:driverId/documents/:documentId/review
Bearer token
Fleet approves or rejects driver documents
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/drivers/:driverId/documents/:documentId/review', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"decision":"APPROVED"})
});
const result = await response.json();Python
payload = json.loads(r'''{"decision":"APPROVED"}''')
response = requests.patch(BASE_URL + '/api/v1/fleets/me/drivers/:driverId/documents/:documentId/review',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"decision":"APPROVED"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/drivers/:driverId/documents/:documentId/review');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X PATCH '<base-url>/api/v1/fleets/me/drivers/:driverId/documents/:documentId/review' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"decision":"APPROVED"}'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/vehicles
Bearer token
Register a vehicle for Admin approval
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/vehicles', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"vin":"1HGCM82633A004352","plateNumber":"RIV-123-AB","brand":"Toyota","model":"Corolla","year":2024,"color":"White"})
});
const result = await response.json();Python
payload = json.loads(r'''{"vin":"1HGCM82633A004352","plateNumber":"RIV-123-AB","brand":"Toyota","model":"Corolla","year":2024,"color":"White"}''')
response = requests.post(BASE_URL + '/api/v1/fleets/me/vehicles',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"vin":"1HGCM82633A004352","plateNumber":"RIV-123-AB","brand":"Toyota","model":"Corolla","year":2024,"color":"White"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/vehicles');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/vehicles' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"vin":"1HGCM82633A004352","plateNumber":"RIV-123-AB","brand":"Toyota","model":"Corolla","year":2024,"color":"White"}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me/vehicles
Bearer token
List fleet vehicles
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/vehicles', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me/vehicles',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/vehicles');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me/vehicles' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/vehicles/:id/documents
Bearer token
Upload one vehicle document for Admin approval (multipart)
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
This endpoint uses multipart/form-data. Send the selected image using the exact field name file; do not manually set the multipart Content-Type boundary.
Node.js
const form = new FormData();
form.append('onboardingToken', '<onboarding-token>');
form.append('file', fileInput.files[0]);
const response = await fetch('/api/v1/fleets/me/vehicles/:id/documents', { method: 'POST', body: form });
const result = await response.json();Python
with open('profile.jpg', 'rb') as photo:
response = requests.post(BASE_URL + '/api/v1/fleets/me/vehicles/:id/documents',
data={'onboardingToken': '<onboarding-token>'},
files={'file': ('profile.jpg', photo, 'image/jpeg')})
result = response.json()PHP
$payload = [
'onboardingToken' => '<onboarding-token>',
'file' => new CURLFile('/path/to/profile.jpg', 'image/jpeg'),
];
$ch = curl_init($baseUrl . '/api/v1/fleets/me/vehicles/:id/documents');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/vehicles/:id/documents' \
+ -F 'onboardingToken=<onboarding-token>' \
+ -F 'file=@/path/to/profile.jpg;type=image/jpeg'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/vehicles/:id/documents/batch
Bearer token
Upload up to 10 vehicle documents in one request (multipart)
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
This endpoint uses multipart/form-data. Send the selected image using the exact field name file; do not manually set the multipart Content-Type boundary.
Node.js
const form = new FormData();
form.append('onboardingToken', '<onboarding-token>');
form.append('file', fileInput.files[0]);
const response = await fetch('/api/v1/fleets/me/vehicles/:id/documents/batch', { method: 'POST', body: form });
const result = await response.json();Python
with open('profile.jpg', 'rb') as photo:
response = requests.post(BASE_URL + '/api/v1/fleets/me/vehicles/:id/documents/batch',
data={'onboardingToken': '<onboarding-token>'},
files={'file': ('profile.jpg', photo, 'image/jpeg')})
result = response.json()PHP
$payload = [
'onboardingToken' => '<onboarding-token>',
'file' => new CURLFile('/path/to/profile.jpg', 'image/jpeg'),
];
$ch = curl_init($baseUrl . '/api/v1/fleets/me/vehicles/:id/documents/batch');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/vehicles/:id/documents/batch' \
+ -F 'onboardingToken=<onboarding-token>' \
+ -F 'file=@/path/to/profile.jpg;type=image/jpeg'
Response —
Run the request to see the response.
POST/api/v1/fleets/me/assignments
Bearer token
Assign an Admin-approved compliant vehicle to a driver
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/assignments', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"driverId":"uuid","vehicleId":"uuid"})
});
const result = await response.json();Python
payload = json.loads(r'''{"driverId":"uuid","vehicleId":"uuid"}''')
response = requests.post(BASE_URL + '/api/v1/fleets/me/assignments',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"driverId":"uuid","vehicleId":"uuid"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/assignments');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X POST '<base-url>/api/v1/fleets/me/assignments' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"driverId":"uuid","vehicleId":"uuid"}'
Response —
Run the request to see the response.
PATCH/api/v1/fleets/me/features/:key
Bearer token
Configure pickup verification, auto-accept, offer countdown, readiness or cash-remittance policy
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/features/:key', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"enabled":true,"config":{"thresholdMinor":500000,"blockOnline":true}})
});
const result = await response.json();Python
payload = json.loads(r'''{"enabled":true,"config":{"thresholdMinor":500000,"blockOnline":true}}''')
response = requests.patch(BASE_URL + '/api/v1/fleets/me/features/:key',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"enabled":true,"config":{"thresholdMinor":500000,"blockOnline":true}}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/features/:key');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X PATCH '<base-url>/api/v1/fleets/me/features/:key' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"enabled":true,"config":{"thresholdMinor":500000,"blockOnline":true}}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me/remittances
Bearer token
List driver remittances awaiting finance review
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/remittances', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me/remittances',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/remittances');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me/remittances' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
PATCH/api/v1/fleets/me/remittances/:id/review
Bearer token
Approve or reject a driver remittance
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/remittances/:id/review', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({"decision":"APPROVED"})
});
const result = await response.json();Python
payload = json.loads(r'''{"decision":"APPROVED"}''')
response = requests.patch(BASE_URL + '/api/v1/fleets/me/remittances/:id/review',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{"decision":"APPROVED"}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/remittances/:id/review');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X PATCH '<base-url>/api/v1/fleets/me/remittances/:id/review' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{"decision":"APPROVED"}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me/monitoring/drivers
Bearer token
Monitor fleet drivers, locations and offline-trip alerts
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/monitoring/drivers', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me/monitoring/drivers',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/monitoring/drivers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me/monitoring/drivers' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me/monitoring/drivers/:id
Bearer token
Monitor one driver and detect stale/offline activity
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me/monitoring/drivers/:id', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me/monitoring/drivers/:id',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me/monitoring/drivers/:id');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me/monitoring/drivers/:id' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
GET/api/v1/fleets/me
Bearer token
Current fleet
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/fleets/me', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.get(BASE_URL + '/api/v1/fleets/me',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/fleets/me');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X GET '<base-url>/api/v1/fleets/me' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
POST/api/v1/trips/:id/dispatch
Bearer token
Assign an eligible driver
Endpoint guide What to send, parse and expect
Why it exists
Use this endpoint to perform the action described above.
Before you call
Use the method and authentication badge shown above. Replace every placeholder with a value returned by an earlier API call.
Request fields
The JSON editor contains a runnable example. Required field rules are returned as error.details.fieldErrors when validation fails.
What to parse
Check success first. On success, read data; on failure, render error.code and error.message.
Request structure and code samples Node.js · Python · PHP · cURL
Replace angle-bracket values with returned values. Use the raw access token only in the Authorization header.
Node.js
const response = await fetch(BASE_URL + '/api/v1/trips/:id/dispatch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer <access-token>',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({})
});
const result = await response.json();Python
payload = json.loads(r'''{}''')
response = requests.post(BASE_URL + '/api/v1/trips/:id/dispatch',
headers={'Idempotency-Key': str(uuid.uuid4())},
json=payload)
result = response.json()PHP
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init($baseUrl . '/api/v1/trips/:id/dispatch');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Idempotency-Key: <uuid>'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);cURL
curl -X POST '<base-url>/api/v1/trips/:id/dispatch' \
+ -H 'Authorization: Bearer <access-token>' \
+ -H 'Content-Type: application/json' \
+ -H 'Idempotency-Key: <uuid>' \
+ --data '{}'
Response —
Run the request to see the response.
Errors and safetyResponses use JSON with a stable error code. Mutating requests receive an automatic idempotency key in the test console. Never paste production credentials here.