Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
3rd Party
This endpoint registers a new tap card and links it to an existing vehicle. The vehicle registration number must already exist in the system.
Charge Vehicle Registration via Wallet This endpoint activates a unified revenue-collection workflow by initiating a wallet deduction for vehicle registration. The service intelligently resolves a vehicle using multiple identity vectors — registration number, tag number, or tap card — ensuring seamless interoperability with tolling, access control, and roadside verification ecosystems. The engine automatically validates identity consistency, enforces anti-replay safeguards (no repeat transactions within 60 seconds), and triggers exception-handling pathways (e.g., stolen or lost vehicle workflows).
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/wallet/vehicle/transact" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABE1234\",
\"tag_number\": \"12345678\",
\"cardnumber\": \"9900112233\",
\"plaza_name\": \"Mupfurudzi\",
\"gate\": 1,
\"cashier\": 7,
\"zinara_ref\": \"ZTS14042025000020v20\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/wallet/vehicle/transact"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABE1234",
"tag_number": "12345678",
"cardnumber": "9900112233",
"plaza_name": "Mupfurudzi",
"gate": 1,
"cashier": 7,
"zinara_ref": "ZTS14042025000020v20"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"message": "Payment successful"
}
Example response (400):
{
"error": "Either registration number or tag number is required"
}
Example response (402):
{
"error": "Insufficient balance in all wallets"
}
Example response (404):
{
"error": "Vehicle not found"
}
Example response (404):
{
"error": "Vehicle not found by registration number"
}
Example response (404):
{
"error": "Vehicle not found by tag number"
}
Example response (404):
{
"error": "TapCard not found"
}
Example response (409):
{
"error": "Can not process same transaction within a minute",
"reg_number": "ABC1234"
}
Example response (422):
{
"error": "Tag and registration number do not match the same vehicle"
}
Example response (423):
{
"reg_number": "ABC1234"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Customer Wallets via Vehicle Info This endpoint retrieves all wallets belonging to the customer associated with a specific vehicle. You can provide either the vehicle's registration number or the assigned tag number.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/vehicle/wallets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABE1234\",
\"tag_number\": \"ZIN12345678\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/vehicle/wallets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABE1234",
"tag_number": "ZIN12345678"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"wallets": [
{
"id": 1,
"balance": 100,
"priority": 1,
"currency": {
"id": 1,
"name": "USD",
"symbol": "$"
}
},
{
"id": 2,
"balance": 50,
"priority": 0,
"currency": {
"id": 2,
"name": "ZWL",
"symbol": "Z$"
}
}
]
}
Example response (404):
{
"error": "Vehicle or customer not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get All Vehicles with Associated Customer Wallets Returns all vehicles in the system along with their associated customer's wallets and currency details.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/vehicle/wallets/all" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/api/vehicle/wallets/all"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
[
{
"vehicle": {
"id": 1,
"reg_number": "ABE1234",
"make": "Toyota"
},
"wallets": [
{
"id": 1,
"balance": 100,
"priority": 1,
"currency": {
"name": "USD",
"symbol": "$"
}
}
]
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Transaction by BUSE Reference This endpoint retrieves a transaction using the provided BUSE reference number (`buse_ref`).
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/ref/transaction?buse_ref=BUSE20250413456789" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"buse_ref\": \"fuga\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/ref/transaction"
);
const params = {
"buse_ref": "BUSE20250413456789",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"buse_ref": "fuga"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"transaction": {
"id": 21,
"buse_ref": "BUSE20250413456789",
"amount": 5,
"currency": {
"id": 1,
"name": "USD",
"symbol": "$"
},
"vehicle": {
"id": 3,
"reg_number": "ABE1234"
},
"toll_gate": {
"id": 2,
"name": "Norton Toll Gate"
},
"tolling_station": {
"id": 1,
"name": "Harare South Station"
}
}
}
Example response (404):
{
"error": "Transaction not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign an RFID tag to a vehicle.
Assigns an RFID tag to a registered vehicle if it doesn't already have an active tag assignment and no pending tag application. If all conditions are met, a tag application is created and immediately approved, then the tag is assigned to the vehicle.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/vehicle/tag/add" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC123\",
\"tag_number\": \"TAG987654\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/vehicle/tag/add"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC123",
"tag_number": "TAG987654"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Tag assigned."
}
Example response (203):
{
"message": "Vehicle already has a valid tag assignment, deactivate and reassign."
}
Example response (400):
{
"message": "Vehicle not found."
}
Example response (409):
{
"message": "A pending tag application already exists for this vehicle."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created tap card in the system.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/vehicle/tapcard/add" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ADG1234\",
\"owner\": \"John Dube\",
\"cardnumber\": \"00019284756\",
\"active\": true
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/vehicle/tapcard/add"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ADG1234",
"owner": "John Dube",
"cardnumber": "00019284756",
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved."
}
Example response (400):
{
"message": "Vehicle not found."
}
Example response (409):
{
"message": "Duplicate card."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deactivate Tap Card
This endpoint operationalizes the deactivation lifecycle for a vehicle-linked tap card. It drives a streamlined workflow where the system cross-references a vehicle’s registration metadata, resolves ownership, and pivots the associated TapCard entity into an inactive state.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/api/vehicle/tag/deactivate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"esse\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/api/vehicle/tag/deactivate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "esse"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "TapCard deactivated"
}
Example response (400):
{
"message": "Vehicle not found."
}
Example response (404):
{
"message": "TapCard not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin
Authenticate an Admin user. This endpoint allows an admin to log in using their email and password. If the credentials are correct, and the user is verified, their details are returned. Otherwise, appropriate error responses are sent.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/auth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"customer@example.com\",
\"password\": \"password123\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/auth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "customer@example.com",
"password": "password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "John Doe",
"email": "admin@example.com",
"verified": 1,
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
Example response (203):
{
"message": "failed"
}
Example response (403):
{
"message": "unverified"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Verify OTP for Admin Login This endpoint verifies the One-Time Password (OTP) provided by the admin. The OTP is retrieved from the cache and validated.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admin_id\": 123,
\"otp\": 654321
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admin_id": 123,
"otp": 654321
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "OTP verified successfully"
}
Example response (401):
{
"message": "Invalid or expired OTP"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Admin Password This endpoint generates a new strong password for the customer and sends it via email. The customer is advised to change this password after logging in.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/password/reset" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"user@example.com\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/password/reset"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "user@example.com"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "A new password has been sent to your email."
}
Example response (404):
{
"message": "Email not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Change Admin Password Allows an authenticated customer to change their password. Sends an email notification confirming the password change.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/password/change" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"old_password\": \"oldP@ssw0rd\",
\"new_password\": \"N3wP@ssw0rd!\",
\"confirm_password\": \"N3wP@ssw0rd!\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/password/change"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"old_password": "oldP@ssw0rd",
"new_password": "N3wP@ssw0rd!",
"confirm_password": "N3wP@ssw0rd!"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Password changed successfully."
}
Example response (203):
{
"message": "Unauthenticated."
}
Example response (401):
{
"message": "Current password is incorrect."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new admin record in the database. This function allows the creation of a new admin by accepting and validating input data. The created record will include personal details, contact information, and login credentials. All fields are assigned to the model's `$fillable` property to ensure proper mass assignment.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fname\": \"\\\"John\\\"\",
\"mname\": \"\\\"David\\\"\",
\"surname\": \"\\\"Doe\\\"\",
\"address\": \"\\\"123 Main Street, Harare\\\"\",
\"phone\": \"\\\"+263772123456\\\"\",
\"email\": \"\\\"johndoe@example.com\\\"\",
\"password\": \"\\\"SecurePassword123\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fname": "\"John\"",
"mname": "\"David\"",
"surname": "\"Doe\"",
"address": "\"123 Main Street, Harare\"",
"phone": "\"+263772123456\"",
"email": "\"johndoe@example.com\"",
"password": "\"SecurePassword123\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{"message": "saved"} Indicates that the admin record was successfully created.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve paginated vehicles. This endpoint allows an authenticated admin to retrieve vehicles in groups of 100. If the `last_id` parameter is provided, it fetches the next 100 vehicles after that ID. If not provided, it returns the first 100 vehicles.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/vehicles?last_id=50" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/vehicles"
);
const params = {
"last_id": "50",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"reg_number": "ABC1234",
"color": "Blue",
"make": "Toyota",
"model": "Corolla",
"class": "Sedan",
...
},
...
],
"pagination": {
"last_id": 100,
"has_more": true
}
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve the registration book of a vehicle.
requires authentication
This endpoint allows an authenticated admin to retrieve the registration book of a vehicle using its ID.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/vehicle/regbook" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/vehicle/regbook"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"reg_book": "j842h4u2io529n442"
}
Example response (203):
{
"message": "Not authenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Find a vehicle by registration number. This endpoint allows an authenticated admin to retrieve a vehicle's details by its registration number.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/vehicle/find" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"ABC1234\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/vehicle/find"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"ABC1234\""
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"reg_number": "ABC1234",
"color": "Blue",
"make": "Toyota",
"model": "Corolla",
"class": "Sedan",
"reg_book": "path/to/file.pdf",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Approve a tag application. This endpoint allows an authenticated admin to approve a tag application. Upon approval, the status of the application is updated, and an email is sent to the customer notifying them of the approval of their tag application.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/application/approve" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bbq\": 123,
\"reg_number\": \"ABC1234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/application/approve"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bbq": 123,
"reg_number": "ABC1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "approved"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Decline a tag application. This endpoint allows an authenticated admin to decline a tag application. Upon declining, the status of the application is updated, and an email is sent to the customer notifying them of the decline of their tag application.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/application/decline" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bbq\": 123,
\"reg_number\": \"ABC1234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/application/decline"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bbq": 123,
"reg_number": "ABC1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "approved"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Find a tag application by vehicle registration number. This endpoint allows an authenticated admin to retrieve the details of a tag application associated with a specific vehicle registration number.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/application/find" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC1234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/application/find"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"reg_number": "ABC1234",
"status": 1,
"declined": 0,
"created_at": "2025-01-25T12:34:56.000000Z",
"updated_at": "2025-01-25T12:34:56.000000Z"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new tag. This endpoint allows an authenticated admin to create a new tag entry in the system. The request should include the tag number and serial of the tag.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/tag" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tag_number\": \"\\\"TAG12345\\\"\",
\"serial\": \"\\\"SN123456789\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/tag"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tag_number": "\"TAG12345\"",
"serial": "\"SN123456789\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all tags. This endpoint retrieves a list of all tags in the system. Only accessible to authenticated admins.
requires authentication
Assigns a tag to a vehicle after the tag application has been approved. This function is used to assign a tag to a vehicle once the tag application has been approved. The function performs the following steps: 1. Authenticates the admin user. 2. Fetches the most recent tag application based on the provided registration number. 3. Updates the status of the application to indicate that it has been approved. 4. Creates a new tag if it doesn't exist already, or fetches an existing tag. 5. Creates a tag assignment that links the vehicle, tag, and application.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/assignappliedtag" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"incidunt\",
\"tag_number\": \"sint\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/assignappliedtag"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "incidunt",
"tag_number": "sint"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "tag assigned"
}
Example response (203):
{"message": "no authenticated"} Unauthorized if the admin is not authenticated.
Example response (403):
{"message": "no authorized"} Forbidden if the application doesn't exist or the vehicle cannot be found.
Example response (409):
{"message": "tag already assigned another vehicle"} Forbidden if the application
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Count of Pending Applications
This endpoint retrieves the count of pending applications where the status is 0 (indicating pending), and the application has not been declined. If the admin is not authenticated, an error message is returned.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/pendingapplications/count" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/pendingapplications/count"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
15
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Paginated Admin Logs
requires authentication
This endpoint retrieves the activity logs of the authenticated admin or another specified admin.
It expects an admin_id parameter to fetch logs for a different admin.
It also expects a last_id parameter to fetch logs in batches of 20.
If last_id is 0, it fetches the first 20 logs.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/audits?admin_id=2&last_id=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/audits"
);
const params = {
"admin_id": "2",
"last_id": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"logs": [
{
"id": 201,
"admin": 2,
"action": "Deactivated a customer account",
"created_at": "2024-03-11 10:15:30",
"updated_at": "2024-03-11 10:15:30"
},
{
"id": 200,
"admin": 2,
"action": "Updated system settings",
"created_at": "2024-03-11 11:00:00",
"updated_at": "2024-03-11 11:00:00"
}
],
"last_id": 200
}
Example response (203):
{
"message": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Paginated Customer Logs (Admin Access)
requires authentication
This endpoint allows an authenticated admin to retrieve the activity logs of a specified customer.
It supports pagination using the last_id parameter, fetching logs in batches of 20.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/customer/audits?client=5&last_id=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/audits"
);
const params = {
"client": "5",
"last_id": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"logs": [
{
"id": 105,
"customer": 5,
"action": "Logged in",
"created_at": "2024-03-11 10:15:30",
"updated_at": "2024-03-11 10:15:30"
},
{
"id": 104,
"customer": 5,
"action": "Updated profile information",
"created_at": "2024-03-11 11:00:00",
"updated_at": "2024-03-11 11:00:00"
}
],
"last_id": 104
}
Example response (203):
{
"message": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve paginated customers. This endpoint allows an authenticated admin to retrieve customers in groups of 100. If the `last_id` parameter is provided, it fetches the next 100 customers after that ID. If not provided, it returns the first 100 customers.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/customer?last_id=100&verified=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer"
);
const params = {
"last_id": "100",
"verified": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"fname": "John",
"mname": "Doe",
"surname": "Smith",
"email": "john@example.com",
...
},
...
],
"pagination": {
"last_id": 100,
"has_more": true
}
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get transactions for the authenticated admin. This endpoint allows an authenticated admin to retrieve transactions related to vehicles and their associated information. The results are paginated based on the last transaction ID.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/transactions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"last_id\": 100
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/transactions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"last_id": 100
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"vehicle": {
"id": 123,
"reg_number": "ABC-1234",
"vihicleClass": {
"price": 150
}
},
"currency": {
"name": "USD"
},
"amount": 100
},
...
],
"pagination": {
"last_id": 150,
"has_more": true
}
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Gate for a Toll Station.
requires authentication
This endpoint allows an authenticated admin to create a new gate for a specific toll station.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/gate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Gate 1\",
\"gate\": \"G01\",
\"toll_station\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/gate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Gate 1",
"gate": "G01",
"toll_station": 10
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Gate created successfully"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (404):
{
"message": "TollStation not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Management
Verify and Activate Customer Account This endpoint allows an authenticated admin to verify and activate a customer's account. Once verified, an email notification is sent to the customer confirming activation.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/activate?customer=123" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fname\": \"John\",
\"email\": \"john.doe@example.com\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/activate"
);
const params = {
"customer": "123",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fname": "John",
"email": "john.doe@example.com"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "verified"
}
Example response (203):
{
"message": "unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new customer account.
requires authentication
This endpoint allows an authenticated admin to create a new customer account. The request must include the required customer details, and the password will be securely hashed before storage.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/customer" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fname\": \"John\",
\"mname\": \"Michael\",
\"surname\": \"Doe\",
\"male\": true,
\"national_id\": \"12-3456789Z-12\",
\"address\": \"123 Example Street, City\",
\"phone\": \"+263712345678\",
\"email\": \"johndoe@example.com\",
\"id_file\": \"ea\",
\"password\": \"secret123\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fname": "John",
"mname": "Michael",
"surname": "Doe",
"male": true,
"national_id": "12-3456789Z-12",
"address": "123 Example Street, City",
"phone": "+263712345678",
"email": "johndoe@example.com",
"id_file": "ea",
"password": "secret123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new vehicle to the system.
requires authentication
This endpoint allows an authenticated admin to register a new vehicle for an existing customer. If the vehicle registration number already exists, an error response is returned.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/customer/vehicle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC-1234\",
\"reg_book\": \"RB123456789\",
\"customer\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/vehicle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC-1234",
"reg_book": "RB123456789",
"customer": 10
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"-*
}
Example response (203):
{
"message": "no authenticated"
}
Example response (403):
{
"message": "Vehicle exists, contact admin"
}
Example response (403):
{
"message": "Customer exists, contact admin"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new wallet for a customer.
requires authentication
This endpoint allows an authenticated admin to create a new wallet for an existing customer. A customer cannot have multiple wallets with the same currency.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/customer/wallet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10,
\"currency\": \"USD\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/wallet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10,
"currency": "USD"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Wallet Created"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (403):
{
"message": "Wallet exists"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a customer's wallets.
requires authentication
This endpoint allows an authenticated admin to fetch all wallets associated with a specific customer.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/customer/wallets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/wallets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"currency": "USD",
"balance": 150.75
},
{
"id": 2,
"currency": "EUR",
"balance": 75.5
}
]
Example response (203):
{
"message": "not authenticated"
}
Example response (404):
{
"message": "No wallets found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Recharge a customer's wallet.
requires authentication
This endpoint allows an authenticated admin to update the balance of a customer's wallet.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/customer/wallet/recharge" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10,
\"wallet\": 5,
\"amount\": \"100.50\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/wallet/recharge"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10,
"wallet": 5,
"amount": "100.50"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Wallet balance updated"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (404):
{
"message": "Wallet not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a customer's vehicles.
requires authentication
This endpoint allows an authenticated admin to retrieve all vehicles belonging to a specific customer. Each vehicle record includes related tag assignment details.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/customer/vehicles" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/vehicles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"vehicles": [
{
"id": 1,
"reg_number": "ABC-1234",
"color": "Red",
"make": "Toyota",
"model": "Corolla",
"class": "Sedan",
"reg_book": "RB123456789",
"customer": 10,
"tagassignment": {
"tag": {
"id": 5,
"serial_number": "TAG-98765"
}
}
}
]
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific vehicle for a customer.
requires authentication
This endpoint allows an authenticated admin to fetch details of a specific vehicle belonging to a customer by providing the customer ID and vehicle registration number.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/customer/vehicle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10,
\"reg_number\": \"\\\"ABC-1234\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/vehicle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10,
"reg_number": "\"ABC-1234\""
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"reg_number": "ABC-1234",
"color": "Red",
"make": "Toyota",
"model": "Corolla",
"class": "Sedan",
"reg_book": "RB123456789",
"customer": 10,
"tagassignment": {
"tag": {
"id": 5,
"tag_number": "TAG-98765"
}
}
Example response (203):
{
"message": "not authenticated"
}
Example response (404):
{
"message": "Vehicle not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve full customer details, including wallets and vehicles.
requires authentication
This endpoint allows an authenticated admin to fetch a customer's details, including their wallets and registered vehicles.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/customer/full" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/customer/full"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"customer": {
"id": 10,
"fname": "John",
"mname": "Doe",
"surname": "Smith",
"email": "john.doe@example.com",
"wallets": [
{
"id": 1,
"currency": "USD",
"balance": 100.5
}
]
},
"vehicles": [
{
"id": 5,
"reg_number": "ABC-1234",
"color": "Red",
"make": "Toyota",
"model": "Corolla",
"vihicleClass": {
"id": 2,
"class_name": "Sedan"
},
"tagassignment": {
"id": 3,
"tag": {
"id": 7,
"tag_number": "TAG-9876"
}
}
}
]
}
Example response (203):
{
"message": "not authenticated"
}
Example response (404):
{
"message": "Customer not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set the priority wallet for a customer.
requires authentication
This endpoint allows an admin to set a specific wallet as the priority wallet for a given customer. Only one wallet can have priority at a time, so all other wallets for the customer will be reset.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/wallet/priority" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 12,
\"wallet\": 45
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/wallet/priority"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 12,
"wallet": 45
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Priority Wallet Updated"
}
Example response (203):
{
"message": "unauthorized"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (400):
{
"message": "Customer not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all Gates for a specific Toll Station.
requires authentication
This endpoint retrieves all the gates associated with a specific toll station.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/gates" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"toll_station\": 10
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/gates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"toll_station": 10
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Gate 1",
"gate": "G01",
"toll_station": 10,
"created_at": "2025-02-14T12:00:00",
"updated_at": "2025-02-14T12:00:00"
},
{
"id": 2,
"name": "Gate 2",
"gate": "G02",
"toll_station": 10,
"created_at": "2025-02-14T12:00:00",
"updated_at": "2025-02-14T12:00:00"
}
]
Example response (403):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Chatbot API
Intelligent chatbot response system. This endpoint allows users to interact with a chatbot for common inquiries related to account management, vehicle registration, wallet recharge, and toll fees.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/chat" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"query\": \"\\\"add vehicle\\\"\",
\"user_id\": 12345
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/chat"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"query": "\"add vehicle\"",
"user_id": 12345
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"status": "success",
"response": "You can add a vehicle to your account by logging in and navigating to the 'Vehicles' section."
}
Example response (400):
{
"status": "error",
"message": "Invalid input. Please provide a valid query."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Currency
Store a new currency. This endpoint allows an authenticated admin to create a new currency entry in the system. The request should include the currency's name and symbol.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/currency" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"\\\"US Dollar\\\"\",
\"symbol\": \"\\\"$\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/currency"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "\"US Dollar\"",
"symbol": "\"$\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve all available currencies. This endpoint fetches a list of all available currencies in the system.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/currencies" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/currencies"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "US Dollar",
"code": "USD",
"symbol": "$",
"created_at": "2025-01-25T12:00:00.000000Z",
"updated_at": "2025-01-25T12:00:00.000000Z"
},
{
"id": 2,
"name": "Euro",
"code": "EUR",
"symbol": "€",
"created_at": "2025-01-25T12:05:00.000000Z",
"updated_at": "2025-01-25T12:05:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get active exchange rates. This endpoint retrieves all currencies with their active exchange rates. It ensures that only one exchange rate is active at a time and filters out inactive ones.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/currency/exchangerates" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/currency/exchangerates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"currencies": [
{
"currency": "USD",
"exchange_rate": {
"rate": 1.2,
"active": true
}
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customer
This endpoint allows a customer to activate their account via a unique activation link.
Activate customer account using self-activation link.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/activate/self" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/activate/self"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "verified"
}
Example response (404):
{
"message": "invalid link"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authenticate a customer user. This endpoint allows a customer to log in using their email and password. If the credentials are correct, and the user is verified, their details are returned. Otherwise, appropriate error responses are sent.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/auth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"customer@example.com\",
\"password\": \"password123\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/auth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "customer@example.com",
"password": "password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "John Doe",
"email": "customer@example.com",
"verified": 1,
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
Example response (203):
{
"message": "failed"
}
Example response (403):
{
"message": "unverified"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Verify OTP for Customer Login This endpoint verifies the One-Time Password (OTP) provided by the customer. The OTP is retrieved from the cache and validated.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 123,
\"otp\": 654321
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": 123,
"otp": 654321
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "OTP verified successfully"
}
Example response (401):
{
"message": "Invalid or expired OTP"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new customer. This endpoint allows the creation of a new customer by providing their personal details. If the operation is successful, a success message is returned.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "fname=John"\
--form "mname=Michael"\
--form "surname=Doe"\
--form "male=1"\
--form "national_id=63-123456X78"\
--form "address=123 Main Street, Harare"\
--form "phone=+263771234567"\
--form "email=customer@example.com"\
--form "password=password123"\
--form "id_file=@C:\Users\leoha\AppData\Local\Temp\phpDBCC.tmp" const url = new URL(
"https://etolling.buseinnovations.com/public/customer"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('fname', 'John');
body.append('mname', 'Michael');
body.append('surname', 'Doe');
body.append('male', '1');
body.append('national_id', '63-123456X78');
body.append('address', '123 Main Street, Harare');
body.append('phone', '+263771234567');
body.append('email', 'customer@example.com');
body.append('password', 'password123');
body.append('id_file', document.querySelector('input[name="id_file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new vehicle. This endpoint allows an authenticated customer to add a new vehicle to their account. If the vehicle registration number already exists in the system, the request is rejected.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/addvehicle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"ABC-1234\\\"\",
\"reg_book\": \"\\\"RB-56789\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/addvehicle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"ABC-1234\"",
"reg_book": "\"RB-56789\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "no authenticated"
}
Example response (403):
{
"message": "Vehicle exists, contact admin"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Apply for a vehicle tag. This endpoint allows an authenticated customer to apply for a tag for a specified vehicle by providing the vehicle's registration number. If the vehicle does not belong to the authenticated customer, the request is rejected. Additionally, duplicate applications with a pending status are not allowed.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/apply" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC-1234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/apply"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC-1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "applied"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (403):
{
"message": "You do not have a vehicle with the provided reg number."
}
Example response (409):
{
"message": "A pending tag application already exists for this vehicle."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new wallet for the authenticated customer. This endpoint allows an authenticated customer to create a new wallet associated with their account. If a wallet with the specified currency already exists for the customer, the request is rejected.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/wallet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"currency\": 1
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/wallet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"currency": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Wallet Created"
}
Example response (203):
{
"message": "not authenticated"
}
Example response (403):
{
"message": "Wallet exists"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Priority Wallet for Logged-In Customer This endpoint allows a customer to set one of their wallets as the priority wallet. It first resets all wallet priorities to 0, then sets the selected wallet to 1.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/wallet/priority" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"wallet\": 12
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/wallet/priority"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"wallet": 12
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Priority Wallet Updated"
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all wallets for the authenticated customer. This endpoint allows an authenticated customer to view all wallets associated with their account.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/wallets" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/wallets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"currency": "USD",
"customer": 123,
"created_at": "2025-01-25T12:34:56.000000Z",
"updated_at": "2025-01-25T12:34:56.000000Z"
},
{
"id": 2,
"currency": "EUR",
"customer": 123,
"created_at": "2025-01-25T12:40:00.000000Z",
"updated_at": "2025-01-25T12:40:00.000000Z"
}
]
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific vehicle for the authenticated customer. This endpoint fetches a vehicle associated with the authenticated customer based on the provided registration number.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/vehicle" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC123\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/vehicle"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC123"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"reg_number": "ABC123",
"model": "Toyota Corolla",
"customer": 123,
"created_at": "2025-01-25T12:34:56.000000Z",
"updated_at": "2025-01-25T12:34:56.000000Z"
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve all vehicles for the authenticated customer. This endpoint fetches all vehicles associated with the authenticated customer.
requires authentication
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/vehicles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/vehicles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"reg_number": "ABC123",
"model": "Toyota Corolla",
"customer": 123,
"created_at": "2025-01-25T12:34:56.000000Z",
"updated_at": "2025-01-25T12:34:56.000000Z"
},
{
"id": 2,
"reg_number": "XYZ789",
"model": "Honda Civic",
"customer": 123,
"created_at": "2025-01-25T12:35:00.000000Z",
"updated_at": "2025-01-25T12:35:00.000000Z"
}
]
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get paginated transactions for a customer's vehicles.
requires authentication
This endpoint retrieves transactions for vehicles that belong to the authenticated customer. Transactions are ordered by ID in descending order to show the latest transactions first. The response includes the last transaction ID and a flag indicating whether more transactions exist.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/transactions?per_page=10&last_id=50" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/transactions"
);
const params = {
"per_page": "10",
"last_id": "50",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 50,
"transaction_date": "2025-01-20T10:00:00",
"vehicle": {
"id": 123,
"vihicleClass": {
"price": 100
}
},
"currency": {
"name": "USD"
}
}
],
"last_id": 45,
"has_more": true
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Customer Password This endpoint generates a new strong password for the customer and sends it via email. The customer is advised to change this password after logging in.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/password/reset" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"user@example.com\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/password/reset"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "user@example.com"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "A new password has been sent to your email."
}
Example response (404):
{
"message": "Email not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Change Customer Password Allows an authenticated customer to change their password. Sends an email notification confirming the password change.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/password/change" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"old_password\": \"oldP@ssw0rd\",
\"new_password\": \"N3wP@ssw0rd!\",
\"confirm_password\": \"N3wP@ssw0rd!\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/password/change"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"old_password": "oldP@ssw0rd",
"new_password": "N3wP@ssw0rd!",
"confirm_password": "N3wP@ssw0rd!"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Password changed successfully."
}
Example response (203):
{
"message": "Unauthenticated."
}
Example response (401):
{
"message": "Current password is incorrect."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Customer Information
requires authentication
This endpoint allows an authenticated customer to update their profile information. Only non-null fields will be updated.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/update" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer\": 1,
\"fname\": \"John\",
\"mname\": \"Doe\",
\"surname\": \"Smith\",
\"male\": true,
\"national_id\": \"12-3456789X12\",
\"address\": \"123 Street, City\",
\"phone\": \"+263771234567\",
\"email\": \"john.doe@example.com\",
\"id_file\": \"id123.png\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/update"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer": 1,
"fname": "John",
"mname": "Doe",
"surname": "Smith",
"male": true,
"national_id": "12-3456789X12",
"address": "123 Street, City",
"phone": "+263771234567",
"email": "john.doe@example.com",
"id_file": "id123.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Customer updated successfully."
}
Example response (203):
{
"message": "Not authenticated."
}
Example response (409):
{
"message": "Customer exists."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Paginated Customer Logs
requires authentication
This endpoint retrieves the activity logs of the authenticated customer in paginated format.
It expects a last_id parameter to fetch logs in batches of 20.
If last_id is 0, it fetches the first 20 logs.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/audits?last_id=0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/audits"
);
const params = {
"last_id": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"logs": [
{
"id": 101,
"customer": 55,
"action": "Logged in",
"created_at": "2024-03-11 10:15:30",
"updated_at": "2024-03-11 10:15:30"
},
{
"id": 100,
"customer": 55,
"action": "Updated profile",
"created_at": "2024-03-11 11:00:00",
"updated_at": "2024-03-11 11:00:00"
}
],
"last_id": 100
}
Example response (203):
{
"message": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deactivate a Tag
requires authentication
This endpoint allows an authenticated admin to deactivate a tag on behalf of a customer. A customer can also deactivate their own tag.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/tag/deactivate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC1234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/tag/deactivate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
json {
"message": "Tag deactivated"
}
Example response (203):
json {
"message": "Not authenticated"
}
Example response (403):
json {
"message": "Unauthorized action"
}
Example response (404):
json {
"message": "Tag not found for the specified vehicle"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Temporarily transfer a vehicle to another user.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/tranfer/temp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle\": 12,
\"temp_client\": 34,
\"duration\": 48,
\"customer\": 34
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/tranfer/temp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle": 12,
"temp_client": 34,
"duration": 48,
"customer": 34
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Transferred successfully"
}
Example response (400):
{
"message": "Vehicle not found or does not belong to the authenticated client."
}
Example response (401):
{
"message": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get customer details by national ID.
Retrieves the first name, middle name, and surname of a customer based on the provided national ID. Only authenticated customers can access this endpoint.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/get/temp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"national_id\": \"12345678901234\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/get/temp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"national_id": "12345678901234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"fname": "John",
"mname": "Doe",
"surname": "Smith"
}
Example response (401):
{
"message": "Unauthenticated"
}
Example response (404):
{
"message": "Customer not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customer Management
Bulk verify and activate customer accounts.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/activate/bulk" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customers\": [
1,
2,
3
]
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/activate/bulk"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customers": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "All selected customers verified, emails are being sent"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
POST _ignition/execute-solution
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/_ignition/execute-solution" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"solution\": \"quia\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/_ignition/execute-solution"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"solution": "quia"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST _ignition/update-config
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/_ignition/update-config" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"theme\": \"dark\",
\"editor\": \"voluptas\",
\"hide_solutions\": true
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/_ignition/update-config"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"theme": "dark",
"editor": "voluptas",
"hide_solutions": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve paginated tag applications.
requires authentication
This endpoint allows an authenticated admin to retrieve tag applications in batches of 100.
If a last_id is provided, the next 100 applications after that ID will be returned.
Otherwise, the first 100 applications are retrieved.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/admin/applications?last_id=100" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/applications"
);
const params = {
"last_id": "100",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"tag_applications": [
{
"id": 1,
"reg_number": "ABC1234",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
},
{
"id": 2,
"reg_number": "XYZ5678",
"created_at": "2024-01-01T01:00:00.000000Z",
"updated_at": "2024-01-01T01:00:00.000000Z"
}
],
"pagination": {
"last_id": 2,
"has_more": true
}
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Top-up a customer's wallet balance.
requires authentication
This endpoint allows an authenticated customer to top up their wallet by adding a specified amount to the existing balance.
The wallet will be identified by the bpd parameter, and the amount will be added to the current balance.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/wallet/topup" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bpd\": 12345,
\"amount\": 50
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/wallet/topup"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bpd": 12345,
"amount": 50
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 12345,
"customer": 67890,
"balance": 150
}
Example response (203):
{not authenticated"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST customer/transact/mobile
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/transact/mobile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/transact/mobile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new gate status.
This endpoint allows you to store a new gate status with the provided information.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/gate/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"gate\": 1,
\"name\": \"\\\"Main Gate\\\"\",
\"state\": \"\\\"Open\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/gate/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"gate": 1,
"name": "\"Main Gate\"",
"state": "\"Open\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Gate created successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the latest statuses for each gate.
This endpoint retrieves the latest status for each gate, including the state and name.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/gates/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/gates/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"gate": 1,
"name": "Main Gate",
"state": "Open",
"created_at": "2025-03-01T12:00:00",
},
{
"gate": 2,
"name": "Side Gate",
"state": "Closed",
"created_at": "2025-03-01T12:30:00",
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST customer/verify/id
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/verify/id" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/customer/verify/id"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Exchange Rates
Store a new exchange rate. This endpoint stores a new exchange rate in the system. It checks if the user is authenticated as an admin before storing the exchange rate. If the user is not authenticated, it returns a response indicating the failure.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/exchangerate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"currency\": \"1\",
\"rate\": 1.2,
\"active\": true
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/exchangerate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"currency": "1",
"rate": 1.2,
"active": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Saved"
}
Example response (203):
{
"message": "not authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve exchange rates. This endpoint fetches all exchange rates stored in the system.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/exchangerates" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/exchangerates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
[
{
"id": 1,
"currency": "USD",
"rate": "370.50",
"created_at": "2024-02-16T10:00:00.000000Z",
"updated_at": "2024-02-16T10:00:00.000000Z"
},
{
"id": 2,
"currency": "EUR",
"rate": "400.75",
"created_at": "2024-02-16T10:05:00.000000Z",
"updated_at": "2024-02-16T10:05:00.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gate
Process a vehicle's toll payment using the wallet associated with the vehicle.
This endpoint processes the toll payment for a vehicle using its specific wallet. The function retrieves the vehicle's wallet and checks if it has enough balance to pay for the toll.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/transact" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"ABC123\\\"\",
\"tag_number\": \"\\\"XYZ789\\\"\",
\"gate\": 1
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/transact"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"ABC123\"",
"tag_number": "\"XYZ789\"",
"gate": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "cleared"
}
Example response (400):
{
"message": "insufficient funds"
}
Example response (404):
{
"message": "Vehicle wallet not found"
}
Example response (404):
{
"message": "Wallet not found"
}
Example response (404):
{
"message": "Vehicle or tag not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
This endpoint processes a cash transaction for a vehicle passing through a gate. It calculates the transaction amount based on the vehicle's class price and the exchange rate for the given currency.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/customer/transact/cash" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"gate\": 1,
\"vehicle\": 123,
\"currency\": \"USD\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/transact/cash"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"gate": 1,
"vehicle": 123,
"currency": "USD"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "cleared"
}
Example response (404):
{
"message": "Gate not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Operators
Store a new operator. This endpoint allows an authenticated admin to create a new operator account. If the operator's email already exists in the system, the request is rejected. Upon successful creation, an email is sent to the operator with their credentials.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/operator" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"fname\": \"\\\"John\\\"\",
\"mname\": \"\\\"Michael\\\"\",
\"surname\": \"\\\"Doe\\\"\",
\"address\": \"\\\"123 Main Street, Harare\\\"\",
\"phone\": \"\\\"+263777123456\\\"\",
\"email\": \"\\\"operator@example.com\\\"\",
\"password\": \"\\\"securePassword123\\\"\",
\"toll_station\": \"\\\"Harare North\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/operator"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"fname": "\"John\"",
"mname": "\"Michael\"",
"surname": "\"Doe\"",
"address": "\"123 Main Street, Harare\"",
"phone": "\"+263777123456\"",
"email": "\"operator@example.com\"",
"password": "\"securePassword123\"",
"toll_station": "\"Harare North\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "no authenticated"
}
Example response (403):
{
"message": "Operator exists"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authenticate an operator. This endpoint allows an operator to log in using their email and password. If authentication is successful and the operator is verified, their details are returned. If the operator is unverified, access is denied.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/operator/auth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"\\\"operator@example.com\\\"\",
\"password\": \"\\\"securePassword123\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/operator/auth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "\"operator@example.com\"",
"password": "\"securePassword123\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"fname": "John",
"mname": "Michael",
"surname": "Doe",
"address": "123 Main Street, Harare",
"phone": "+263777123456",
"email": "operator@example.com",
"toll_station": "Harare North",
"verified": 1
}
Example response (203):
{
"message": "failed"
}
Example response (403):
{
"message": "unverified"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Price
Store a new price entry for a given class. This function is used to store a new price entry in the database for a specific class. The function performs the following steps: 1. Authenticates the admin user. 2. Creates a new price entry with the provided class, price, and active status.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/price" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"class\": \"rerum\",
\"price\": 231936,
\"active\": false
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/price"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"class": "rerum",
"price": 231936,
"active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Price saved successfully"
}
Example response (203):
{"message": "no authenticated"} Unauthorized if the admin is not authenticated.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tolling Transactions
Get consolidated transactions for a specific date.
This endpoint retrieves all transactions for a given date where currency and payment are not zero. It also consolidates the total amounts per currency and provides details about the toll gate and tolling station.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/gate/consolidate_today" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2025-02-14\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/gate/consolidate_today"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2025-02-14"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"transactions": [
{
"id": 272,
"vehicle": 19,
"payment": 1,
"currency": {
"id": 4,
"name": "Euro",
"symbol": "E",
"created_at": "2025-02-01T10:31:50.000000Z",
"updated_at": "2025-02-01T10:31:50.000000Z"
},
"amount": 2.76,
"created_at": "2025-02-14T17:39:23.000000Z",
"updated_at": "2025-02-14T17:39:23.000000Z",
"gate": 1,
"station": 2,
"toll_gate": {
"id": 1,
"name": "Buse Exit",
"gate": 1,
"toll_station": 2,
"created_at": "2025-02-14T17:02:45.000000Z",
"updated_at": "2025-02-14T17:02:45.000000Z"
},
"tolling_station": {
"id": 2,
"name": "Buse",
"created_at": "2025-02-01T10:32:05.000000Z",
"updated_at": "2025-02-01T10:32:05.000000Z"
}
}
],
"consolidations": [
{
"date": "2025-02-14",
"currency": 1,
"total_amount": 2.76,
"toll_gate": {
"id": 1,
"name": "Buse Exit"
},
"tolling_station": {
"id": 2,
"name": "Buse"
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Consolidate transactions based on date and filter. This endpoint consolidates toll gate transactions by grouping them based on the provided filter. If the filter is 1 (1 week) or 2 (1 month), transactions are grouped by day. If the filter is 3 (3 months), 4 (6 months), or 5 (1 year), transactions are grouped by week.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/filtered" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"\\\"2024-07-15\\\"\",
\"filter\": 2
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/filtered"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "\"2024-07-15\"",
"filter": 2
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"transactions": [
{
"id": 1,
"created_at": "2024-07-15 10:30:00",
"currency": "USD",
"amount": 50,
"toll_gate": {
"id": 1,
"name": "Harare South"
},
"tolling_station": {
"id": 2,
"name": "Main Toll Station"
}
}
],
"consolidations": [
{
"date_group": "2024-07-15",
"currency": "USD",
"total_amount": 500,
"toll_gate": {
"id": 1,
"name": "Harare South"
},
"tolling_station": {
"id": 2,
"name": "Main Toll Station"
}
}
]
}
Example response (400):
{
"error": "Invalid date format. Expected Y-m-d."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tollingstation
Store a newly created toll station in the database. This method checks if the admin is authenticated. If the admin is authenticated, the toll station is saved to the database with the provided name from the request. After saving, it returns a JSON response indicating that the data has been saved. If the admin is not authenticated, a JSON response with a 203 status code is returned.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/tollingstation" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/admin/tollingstation"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Assign an operator to a toll station. This endpoint allows an authenticated admin to assign a toll station to an operator.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/operator/assign/tollingstation" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"operator\": 1,
\"toll_station\": \"\\\"Harare North\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/operator/assign/tollingstation"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"operator": 1,
"toll_station": "\"Harare North\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Transfers
Retrieve vehicle transfer records.
requires authentication
This endpoint returns vehicle transfer details depending on the authenticated user type.
- Admin: Retrieves all vehicle transfers in the system with related vehicle, original owner, and temporary owner.
- Customer: Retrieves transfers where the customer is either the original owner or the temporary owner.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/vehicles/transfers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/vehicles/transfers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Admin retrieving transfers):
{
"all_transfers": [
{
"id": 1,
"vehicle": {
"id": 12,
"plate_number": "ABC123"
},
"org_owner": {
"id": 5,
"fname": "John",
"surname": "Doe"
},
"temp_owner": {
"id": 8,
"fname": "Jane",
"surname": "Smith"
},
"duration": 48,
"created_at": "2025-09-14T10:30:00Z"
}
]
}
Example response (200, Customer retrieving their transfers):
{
"data": [
{
"id": 2,
"vehicle": {
"id": 14,
"plate_number": "XYZ987"
},
"org_owner": {
"id": 5,
"fname": "John",
"surname": "Doe"
},
"temp_owner": {
"id": 10,
"fname": "Alice",
"surname": "Brown"
},
"duration": 72,
"created_at": "2025-09-13T08:00:00Z"
}
]
}
Example response (203, Unauthenticated):
{
"error": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cancel a temporary vehicle transfer.
requires authentication
This endpoint cancels an active temporary transfer.
- Admins can cancel any transfer.
- Customers can cancel transfers where they are either the original owner or the temporary owner.
Cancellation sets the transfer as inactive and triggers email notifications to both the original and temporary owners.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicles/transfers/cancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"transfer_id\": 15
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicles/transfers/cancel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"transfer_id": 15
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Vehicle transfer has been successfully cancelled."
}
Example response (203):
{
"error": "You are not authorized to cancel this transfer."
}
Example response (404):
{
"error": "Transfer not found."
}
Example response (409):
{
"error": "This transfer is already inactive and cannot be cancelled."
}
Example response (422):
{
"transfer_id": [
"The transfer id field is required."
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vehicle
Report a vehicle as lost or stolen.
requires authentication
This function allows authenticated users (either an admin or a customer) to update a vehicle's status as lost or stolen.
- Admins can update a vehicle's status by registration number.
- Customers can update a vehicle's status by vehicle ID.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/report" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"ABC123\\\"\",
\"vehicle\": 12,
\"lost\": true,
\"stolen\": false
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/report"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"ABC123\"",
"vehicle": 12,
"lost": true,
"stolen": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "saved"
}
Example response (203):
{
"message": "no authenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Find Vehicle Operator
This endpoint retrieves vehicle details based on the provided registration number or tag number. If a matching vehicle is found, a transaction is initialized, and the vehicle's active wallet is checked.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/operator/vehicle/find" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"AFC0145\\\"\",
\"tag_number\": \"\\\"TAG12345\\\"\",
\"gate\": 1,
\"img\": \"hda684i2nk4m1h\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/operator/vehicle/find"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"AFC0145\"",
"tag_number": "\"TAG12345\"",
"gate": 1,
"img": "hda684i2nk4m1h"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"reg_number": "AFC0145",
"customer": {
"id": 5,
"name": "John Doe"
},
"tagassignment": {
"tag": {
"tag_number": "TAG12345"
}
},
"vihicleClass": {
"price": 10
}
}
Example response (403):
"vehicle not found"
Example response (403):
"gate not found"
Example response (409):
{
"id": 1,
"reg_number": "AFC0145",
"customer": {
"id": 5,
"name": "John Doe"
},
"tagassignment": {
"tag": {
"tag_number": "TAG12345"
}
},
"vihicleClass": {
"price": 10.00
}
} The vehicle was found but does not have an active wallet, requiring cash or e-payments.
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vehicle Allocation
Accept a temporary vehicle allocation.
Allows the temporary owner to accept the allocated vehicle. Once accepted, the allocation becomes active and valid for the specified duration.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/customer/vehicle/temp/accept" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pbq\": \"\\\"YmFzZTY0ZW5jb2RlZElE\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/customer/vehicle/temp/accept"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pbq": "\"YmFzZTY0ZW5jb2RlZElE\""
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Temporary allocation accepted successfully"
}
Example response (404):
{
"message": "Temporary allocation not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check all temporary vehicle allocations and update their status.
Iterates through all temporary transfers, checks if the duration has expired, and deactivates expired allocations. Expired allocations fall back to the original owner.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/vehicle/temp/validate" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/temp/validate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Checked all temporary allocations"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
VehicleClasses
Store a new vehicle class in the database. This method checks if the admin is authenticated. If authenticated, it verifies whether a vehicle class with the same `class` and `name` already exists. If a duplicate entry is found, it returns a 403 status code with an "already exists" message. Otherwise, it creates a new vehicle class entry in the database and returns a success response. If the admin is not authenticated, a response with a 203 status code is returned.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/admin/class" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"class\": 0,
\"name\": \"\\\"Light motor Vehicle\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/admin/class"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"class": 0,
"name": "\"Light motor Vehicle\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vehicle License Management
Store a new vehicle license. This endpoint allows an authenticated admin to create a new vehicle license.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/license" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"ABC123\",
\"expiry\": \"2025-12-31\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/license"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "ABC123",
"expiry": "2025-12-31"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "licensed",
"license": {
"id": 1,
"vehicle": 10,
"expiry": "2025-12-31",
"expired": 0,
"created_at": "2024-02-26T10:00:00.000000Z"
}
}
Example response (400):
{
"message": "Vehicle not found."
}
Example response (401):
{
"message": "Not authenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check the license status of a vehicle. This endpoint allows an authenticated admin to check the license status of a vehicle using its registration number. It retrieves the active (non-expired) license for the vehicle.
requires authentication
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/license/check" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reg_number\": \"\\\"ABC-123\\\"\"
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/license/check"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reg_number": "\"ABC-123\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"vehicle": 5,
"license_number": "LIC-20231234",
"issued_at": "2023-01-10",
"expires_at": "2024-01-10",
"expired": 0,
"created_at": "2023-01-10T10:00:00.000000Z",
"updated_at": "2023-05-10T10:00:00.000000Z"
}
Example response (400):
{
"message": "Vehicle not found."
}
Example response (401):
{
"message": "Not authenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vehicle Wallet Management
Store a vehicle wallet.
This function checks if a vehicle already has an active wallet. If so, it prevents the creation of a new active wallet. It allows creation of additional wallets, but only one wallet can be marked as active at a time.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/wallet" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle\": 123,
\"wallet\": 456,
\"limit_day\": 100
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/wallet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle": 123,
"wallet": 456,
"limit_day": 100
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Wallet created successfully."
}
Example response (203):
{
"message": "Not authenticated."
}
Example response (404):
{
"message": "This vehicle already has a wallet."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deactivate a vehicle wallet.
This endpoint deactivates the wallet associated with a specific vehicle. It checks if the customer and admin are authenticated, and verifies if the vehicle has a wallet. If the wallet exists, it will be deactivated.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/wallet/deactivate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle\": 123,
\"wallet\": 456
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/wallet/deactivate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle": 123,
"wallet": 456
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Wallet deactivated successfully."
}
Example response (203):
{
"message": "Not authenticated."
}
Example response (404):
{
"message": "Wallet not found for this vehicle."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all wallets associated with a specific vehicle.
This function fetches all the wallets associated with a specific vehicle. It ensures that the request is made by either an authenticated customer or an admin. If neither is authenticated, the request will be denied. The wallets retrieved include the associated currency information.
Example request:
curl --request POST \
"https://etolling.buseinnovations.com/public/vehicle/wallets" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle\": 1
}"
const url = new URL(
"https://etolling.buseinnovations.com/public/vehicle/wallets"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"vehicle": 1,
"wallet": 1,
"active": 1,
"limit_day": 100,
"created_at": "2025-02-14T17:39:23.000000Z",
"updated_at": "2025-02-14T17:39:23.000000Z",
"waletObj": {
"currency": {
"id": 1,
"name": "USD",
"symbol": "$",
"created_at": "2025-02-01T10:31:50.000000Z",
"updated_at": "2025-02-01T10:31:50.000000Z"
}
}
}
]
}
Example response (203):
{
"message": "Not authenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Wallet Notifications
Notify wallets with a balance below twice the highest vehicle class price.
This endpoint checks all wallets and sends a notification if the balance is below twice the highest class price of any vehicle in the fleet. The notification is sent via email to the customer associated with the wallet.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/wallets/notify" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/wallets/notify"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Notifications sent successfully"
}
Example response (500):
{
"message": "An error occurred while sending notifications"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Zinara
Get Vehicle Master Info This endpoint retrieves vehicle registration information by calling the Zinara vehicle master API. It requires a `reg_number` query parameter and returns vehicle details such as make, model, chassis, registration number, license status, and more.
Example request:
curl --request GET \
--get "https://etolling.buseinnovations.com/public/master/vehicle?reg_number=AAA0002" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://etolling.buseinnovations.com/public/master/vehicle"
);
const params = {
"reg_number": "AAA0002",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
{
"responseCode": "200",
"message": "Success",
"data": {
"id": 127053,
"createdByUser": "test_user",
"dateCreated": "2025-04-16T06:27:36.475857",
"modifiedByUser": "",
"dateModified": "2025-04-16T06:27:36.475865",
"activeStatus": true,
"make": "MITSUBISHI",
"registrationNumber": "AAA0002",
"model": "L200",
"chassis": "VF38BLFVE80343736",
"color": "",
"ownerNationalID": "",
"currentLicenceExpiryDate": "31 Jan 13",
"grossVehicleMass": "",
"netMass": "1134",
"arrearAmount": "0",
"penaltyAmount": "0",
"vehicleLicenseStatusType": "EXPIREDLICENSE",
"vehicleLicenseStatusUpdateReason": "",
"vehicleClassificationType": "LIGHTMOTORVEHICLE",
"exemptionType": "LICENSED",
"isExemptionStatus": false,
"exemptionDescription": "NOTEXEMPTED",
"cvrStatus": null,
"natureOfOnwership": "BUSINESS"
}
}
Example response (500, Error response):
{
"responseCode": "500",
"message": "cURL Error",
"error": "Could not resolve host: core-engine.zwzinara.net"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.