Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Authentication
Apis for authentication of users
Register an owner
This api allows you to register an owner
Example request:
curl --request POST \
"http://localhost/api/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"possimus\",
\"phone\": \"et\",
\"email\": \"gferry@example.net\",
\"password\": \"5<V=D<x\\\\[w\"
}"
const url = new URL(
"http://localhost/api/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "possimus",
"phone": "et",
"email": "gferry@example.net",
"password": "5<V=D<x\\[w"
};
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.
Login a user
This api allows you to log into the system and gives you the authentication token required for most of the apis.
Example request:
curl --request POST \
"http://localhost/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"+251911111111\",
\"password\": \"12345678\"
}"
const url = new URL(
"http://localhost/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "+251911111111",
"password": "12345678"
};
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.
Check User
This api allows you to check if a user exists with the phone number provided.
Example request:
curl --request POST \
"http://localhost/api/auth/check-user" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"aut\"
}"
const url = new URL(
"http://localhost/api/auth/check-user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "aut"
};
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.
Reset Password
This api allows you reset password.
Example request:
curl --request POST \
"http://localhost/api/auth/reset-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"perferendis\",
\"password\": \"pj*0X]7!p:})\"
}"
const url = new URL(
"http://localhost/api/auth/reset-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "perferendis",
"password": "pj*0X]7!p:})"
};
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.
Refresh Token
This api allows you to refresh expired tokens.
Example request:
curl --request POST \
"http://localhost/api/auth/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"quibusdam\",
\"password\": \"$yd~zY-Rd+m:\"
}"
const url = new URL(
"http://localhost/api/auth/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "quibusdam",
"password": "$yd~zY-Rd+m:"
};
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.
Send Verification OTP
This api allows you to send a verification OTP to a user .
Example request:
curl --request POST \
"http://localhost/api/auth/send-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"assumenda\"
}"
const url = new URL(
"http://localhost/api/auth/send-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "assumenda"
};
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.
Validate OTP
This api allows you to validate an OTP sent to the user .
Example request:
curl --request POST \
"http://localhost/api/auth/verify-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"recusandae\",
\"code\": \"accusamus\"
}"
const url = new URL(
"http://localhost/api/auth/verify-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "recusandae",
"code": "accusamus"
};
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.
Log out
requires authentication
This api allows you to log out of the system.
Example request:
curl --request POST \
"http://localhost/api/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/auth/logout"
);
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.
Change Profile
This api allows you to change name and email of users(owners).
Example request:
curl --request POST \
"http://localhost/api/auth/change-profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"esse\",
\"email\": \"witting.lizzie@example.net\"
}"
const url = new URL(
"http://localhost/api/auth/change-profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "esse",
"email": "witting.lizzie@example.net"
};
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.
Get profile(User)
This api returns the currently logged-in user from the authentication token.
Example request:
curl --request GET \
--get "http://localhost/api/auth/get-profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/auth/get-profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Change Password
This api allows you to change your password.
Example request:
curl --request POST \
"http://localhost/api/auth/change-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"old_password\": \"expedita\",
\"new_password\": \"placeat\",
\"confirm_password\": \"nostrum\"
}"
const url = new URL(
"http://localhost/api/auth/change-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"old_password": "expedita",
"new_password": "placeat",
"confirm_password": "nostrum"
};
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.
Booking
Bookings
requires authentication
This api returns a list of all bookings.
Example request:
curl --request GET \
--get "http://localhost/api/bookings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9b02f6f0-b553-4330-a8e9-9de0b48a76e9",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
{
"id": "9b02f6f0-ba98-4a65-9d04-ddb5e099f5c7",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
}
],
"message": "",
"count": "25",
"status": "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.
Get a booking
requires authentication
This api returns a single booking by its ID.
Example request:
curl --request GET \
--get "http://localhost/api/bookings/show/9af6d87b-c879-4734-8bf6-b8210f282e48" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings/show/9af6d87b-c879-4734-8bf6-b8210f282e48"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9b02f6f0-be47-439f-9f3f-5c20ed029dc6",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
"message": "",
"count": "25",
"status": "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.
Get owner bookings
requires authentication
This api returns a list of all bookings belonging to the logged in user owner.
Example request:
curl --request GET \
--get "http://localhost/api/bookings/get-owner-bookings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings/get-owner-bookings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9b02f6f0-c192-40ae-ac9f-3052224f7e93",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
{
"id": "9b02f6f0-c257-4c7b-a6ab-cdc8ca984ba1",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
}
],
"message": "",
"count": "25",
"status": "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.
Get by owners
requires authentication
This api returns a list of all bookings belonging to the owner with the given id.
Example request:
curl --request GET \
--get "http://localhost/api/bookings/get-by-owners/9af6d735-923f-46d0-933b-8085b48e05cc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings/get-by-owners/9af6d735-923f-46d0-933b-8085b48e05cc"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9b02f6f0-c705-4590-bcb6-9e06bcf6922f",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
{
"id": "9b02f6f0-c7ea-4f25-9baa-282101d3ea3e",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
}
],
"message": "",
"count": "25",
"status": "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.
Get bookings by Vehicles
requires authentication
This api returns a list of all bookings belonging to a specific vehicle.
Example request:
curl --request GET \
--get "http://localhost/api/bookings/get-by-vehicle/9af6d80b-3152-4f9f-958c-710df03406f0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings/get-by-vehicle/9af6d80b-3152-4f9f-958c-710df03406f0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": "9b02f6f0-cc81-4f39-ac01-5aacccf1cdc6",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
{
"id": "9b02f6f0-cd68-411e-81e0-6480e221a661",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
}
],
"message": "",
"count": "25",
"status": "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.
Create new Booking
requires authentication
This api allows you to create a new Booking.
Example request:
curl --request POST \
"http://localhost/api/bookings/store" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Abebe\",
\"phone\": \"+251911545454\",
\"email\": \"driver@gmail.com\",
\"vehicle_ids\": [],
\"note\": \"notes\",
\"booking_date\": \"10\\/25\\/2023\",
\"booking_time\": \"12:30 PM\",
\"vehicle_id\": \"f6aeb215-5280-40b9-b059-3e7caf2b23c7\"
}"
const url = new URL(
"http://localhost/api/bookings/store"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Abebe",
"phone": "+251911545454",
"email": "driver@gmail.com",
"vehicle_ids": [],
"note": "notes",
"booking_date": "10\/25\/2023",
"booking_time": "12:30 PM",
"vehicle_id": "f6aeb215-5280-40b9-b059-3e7caf2b23c7"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9b02f6f0-d39f-4561-b6fa-1ae24fc766ad",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
"message": "Your booking has been created successfully.",
"count": "25",
"status": "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.
Update a Booking
requires authentication
This api allows you to update a Booking.
Example request:
curl --request PUT \
"http://localhost/api/bookings/update/ducimus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Abebe\",
\"phone\": \"+251911545454\",
\"email\": \"driver@gmail.com\",
\"vehicle_ids\": [],
\"note\": \"notes\",
\"booking_date\": \"10\\/25\\/2023\",
\"booking_time\": \"12:30 PM\",
\"vehicle_id\": \"f6aeb215-5280-40b9-b059-3e7caf2b23c7\"
}"
const url = new URL(
"http://localhost/api/bookings/update/ducimus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Abebe",
"phone": "+251911545454",
"email": "driver@gmail.com",
"vehicle_ids": [],
"note": "notes",
"booking_date": "10\/25\/2023",
"booking_time": "12:30 PM",
"vehicle_id": "f6aeb215-5280-40b9-b059-3e7caf2b23c7"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9b02f6f0-dacc-4d23-a85a-4a2395a26e07",
"name": "",
"phone": "",
"email": "",
"owner": null,
"vehicles": [],
"vehicle_ids": [],
"note": "",
"booking_date": "",
"booking_time": "",
"created_at": "1 second ago"
},
"message": "Your booking has been updated successfully.",
"count": "25",
"status": "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.
Delete a booking
requires authentication
This api allows you to delete a booking
Example request:
curl --request DELETE \
"http://localhost/api/bookings/delete/aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bookings/delete/aperiam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Codes
Work Order Code
Returns the name value(number) pair of work order codes
Example request:
curl --request GET \
--get "http://localhost/api/work-order-code" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-order-code"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Work Order Code
Returns the name value(number) pair of work order codes
Example request:
curl --request GET \
--get "http://localhost/api/test/qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/test/qui"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Endpoints
GET api/user
Example request:
curl --request GET \
--get "http://localhost/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Owner
Get Owners
This api returns a collection of owners
Example request:
curl --request GET \
--get "http://localhost/api/owners?offset=10&limit=20&search=abebe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/owners"
);
const params = {
"offset": "10",
"limit": "20",
"search": "abebe",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 an Owner
This api returns a single instance of an Owner
Example request:
curl --request GET \
--get "http://localhost/api/owners/9af6d735-923f-46d0-933b-8085b48e05cc" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/owners/9af6d735-923f-46d0-933b-8085b48e05cc"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Owner
This api allows you to create a new owner
Example request:
curl --request POST \
"http://localhost/api/owners/store" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"aliquid\",
\"email\": \"christ08@example.com\",
\"phone\": \"laboriosam\",
\"is_company\": true,
\"address\": \"non\"
}"
const url = new URL(
"http://localhost/api/owners/store"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "aliquid",
"email": "christ08@example.com",
"phone": "laboriosam",
"is_company": true,
"address": "non"
};
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.
Update Owner
This api allows you to update an owner
Example request:
curl --request PUT \
"http://localhost/api/owners/update/necessitatibus" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"tempore\",
\"email\": \"qlabadie@example.org\",
\"phone\": \"unde\",
\"is_company\": true,
\"address\": \"laborum\"
}"
const url = new URL(
"http://localhost/api/owners/update/necessitatibus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "tempore",
"email": "qlabadie@example.org",
"phone": "unde",
"is_company": true,
"address": "laborum"
};
fetch(url, {
method: "PUT",
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.
Delete Owner
Example request:
curl --request DELETE \
"http://localhost/api/owners/delete/aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/owners/delete/aperiam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Permission
Get permissions
This api returns a collection of permissions in the system.
Example request:
curl --request GET \
--get "http://localhost/api/permissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/permissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 a permission
This api returns a single instance of permission
Example request:
curl --request GET \
--get "http://localhost/api/permissions/9af6d6ce-297d-4ad3-b3d1-bb19f34dba9b" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/permissions/9af6d6ce-297d-4ad3-b3d1-bb19f34dba9b"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Report
Get summary
This api returns summary of vehicles, work orders, owners and vehicle intakes in the system
Example request:
curl --request GET \
--get "http://localhost/api/summary" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/summary"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
vary: Origin
{
"message": "",
"status": true,
"count": 0,
"data": {
"vehicle": 3,
"owner": 2,
"workOrder": 2,
"vehicleIntake": 2
}
}
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 vehicle summary
This api returns the summary of vehicles for every month of this year
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-summary" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-summary"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
vary: Origin
{
"message": "",
"status": true,
"count": 0,
"data": {
"total": 3
}
}
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 work order summary
This api returns the summary of work orders for every month of this year.
Example request:
curl --request GET \
--get "http://localhost/api/work-order-summary" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-order-summary"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
vary: Origin
{
"message": "",
"status": true,
"count": 0,
"data": {
"initiated": 2,
"total": 2
}
}
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.
Filter vehicles
This api returns a collection of vehicles filtered by the specified parameters.
Example request:
curl --request GET \
--get "http://localhost/api/reports/vehicles?offset=10&limit=20&search=Desire&filter[]=ut" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/vehicles"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
"filter[0]": "ut",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter vehicle for excel
Example request:
curl --request GET \
--get "http://localhost/api/reports/vehicle-export?search=Desire&filter[]=blanditiis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/vehicle-export"
);
const params = {
"search": "Desire",
"filter[0]": "blanditiis",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter owner
This api returns a collection of owners filtered by the given parameters
Example request:
curl --request GET \
--get "http://localhost/api/reports/owners?offset=10&limit=20&search=abebe&filter[]=et" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/owners"
);
const params = {
"offset": "10",
"limit": "20",
"search": "abebe",
"filter[0]": "et",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter owner for excel
Example request:
curl --request GET \
--get "http://localhost/api/reports/owners/export?search=abebe&filter[]=aut" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/owners/export"
);
const params = {
"search": "abebe",
"filter[0]": "aut",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter vehicle intakes
This api returns a collection of vehicle intakes that are filtered by the given parameters
Example request:
curl --request GET \
--get "http://localhost/api/reports/vehicle-intakes?offset=10&limit=20&search=quidem&filter[]=molestiae" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/vehicle-intakes"
);
const params = {
"offset": "10",
"limit": "20",
"search": "quidem",
"filter[0]": "molestiae",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter vehicle intake for export
Example request:
curl --request GET \
--get "http://localhost/api/reports/vehicle-intakes/export?search=sequi&filter[]=et" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/vehicle-intakes/export"
);
const params = {
"search": "sequi",
"filter[0]": "et",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter work order
This api returns a collection of work orders filtered by the given parameters
Example request:
curl --request GET \
--get "http://localhost/api/reports/work-orders?offset=10&limit=20&search=Desire&filter[]=quasi" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/work-orders"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
"filter[0]": "quasi",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter work order for export
Example request:
curl --request GET \
--get "http://localhost/api/reports/work-orders/export?search=eos&filter[]=impedit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/work-orders/export"
);
const params = {
"search": "eos",
"filter[0]": "impedit",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter work order details
This api returns a collection of work order details filtered by the given parameters
Example request:
curl --request GET \
--get "http://localhost/api/reports/work-order-details?offset=10&limit=20&search=ipsa&filter[]=nobis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/work-order-details"
);
const params = {
"offset": "10",
"limit": "20",
"search": "ipsa",
"filter[0]": "nobis",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Filter work order details for export
This api returns a collection of work order details filtered by the given parameters without pagination and search
Example request:
curl --request GET \
--get "http://localhost/api/reports/work-order-details/export?search=ex&filter[]=non" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/reports/work-order-details/export"
);
const params = {
"search": "ex",
"filter[0]": "non",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Role
Get All Roles
This api returns a collection of all roles without pagination and searching.
Example request:
curl --request GET \
--get "http://localhost/api/get-all-roles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/get-all-roles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Attach permissions
This api allows you to attach permissions to a role.
Example request:
curl --request POST \
"http://localhost/api/roles/attach-permissions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role_id\": \"optio\",
\"permissions\": null
}"
const url = new URL(
"http://localhost/api/roles/attach-permissions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"role_id": "optio",
"permissions": null
};
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.
Get Roles
This api returns a collection of roles.
Example request:
curl --request GET \
--get "http://localhost/api/roles?offset=10&limit=20&search=owner" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/roles"
);
const params = {
"offset": "10",
"limit": "20",
"search": "owner",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Role
This api allows you to create a role.
Example request:
curl --request POST \
"http://localhost/api/roles/store" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Owner\"
}"
const url = new URL(
"http://localhost/api/roles/store"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Owner"
};
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.
Get a role
This api returns a single instance of role
Example request:
curl --request GET \
--get "http://localhost/api/roles/2add60db-3c90-4f07-a609-4ecc3700728d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/roles/2add60db-3c90-4f07-a609-4ecc3700728d"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Update role
This api allows you to update a role
Example request:
curl --request PUT \
"http://localhost/api/roles/update/rerum" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Owner\"
}"
const url = new URL(
"http://localhost/api/roles/update/rerum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Owner"
};
fetch(url, {
method: "PUT",
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.
Delete a Role
This api allows you to delete a role
Example request:
curl --request DELETE \
"http://localhost/api/roles/delete/assumenda" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/roles/delete/assumenda"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Users
List Users
This api returns a list of users.
Example request:
curl --request GET \
--get "http://localhost/api/users?offset=0&limit=10&search=Abebe" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users"
);
const params = {
"offset": "0",
"limit": "10",
"search": "Abebe",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Store Users
This api allows you to create a new user(Employee of VIMS).
Example request:
curl --request POST \
"http://localhost/api/users/store?offset=10&limit=20&search=Abebe" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"quaerat\",
\"phone\": \"[251744272277$)\"
}"
const url = new URL(
"http://localhost/api/users/store"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Abebe",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quaerat",
"phone": "[251744272277$)"
};
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.
Sync Roles
This api allows you sync multiple roles to a user.
Example request:
curl --request POST \
"http://localhost/api/users/sync-roles?user_id=sapiente&roles[]=et" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/sync-roles"
);
const params = {
"user_id": "sapiente",
"roles[0]": "et",
};
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());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 Status
This api allows you to change the status(activate/deactivate) of the user
Example request:
curl --request GET \
--get "http://localhost/api/users/change-user-status/placeat?user_id=omnis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/change-user-status/placeat"
);
const params = {
"user_id": "omnis",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 A User
This api returns a single user instance.
Example request:
curl --request GET \
--get "http://localhost/api/users/9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c?user_id=et" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c"
);
const params = {
"user_id": "et",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Update A User
This api allows you to update a user
Example request:
curl --request PUT \
"http://localhost/api/users/update/et?user_id=est" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"occaecati\",
\"phone\": \"omnis\",
\"type\": \"enim\"
}"
const url = new URL(
"http://localhost/api/users/update/et"
);
const params = {
"user_id": "est",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "occaecati",
"phone": "omnis",
"type": "enim"
};
fetch(url, {
method: "PUT",
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.
Delete a user
This api allows you to delete a user.
Example request:
curl --request DELETE \
"http://localhost/api/users/delete/recusandae?user_id=aut" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/delete/recusandae"
);
const params = {
"user_id": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Vehicle
Get Vehicles
This api returns a collection of vehicles
Example request:
curl --request GET \
--get "http://localhost/api/vehicles?offset=10&limit=20&search=Desire" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
};
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": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
{
"id": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
}
],
"message": "",
"count": "25",
"status": "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.
Create a Vehicle
This api allows you to create a new vehicle
Example request:
curl --request POST \
"http://localhost/api/vehicles/store" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "plate_number=C23232"\
--form "color=white"\
--form "model=Desire"\
--form "owner=98367463-ce48-4e51-8e29-f49f0b1f2c0c"\
--form "code=2"\
--form "current_km_reading=quidem"\
--form "chassis_number=28798784"\
--form "ownership_type=private"\
--form "driver_name=Kebede"\
--form "driver_phone=0911888888"\
--form "current_km_reding=25K"\
--form "vehicle_image=@/tmp/phpyuqAom" const url = new URL(
"http://localhost/api/vehicles/store"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('plate_number', 'C23232');
body.append('color', 'white');
body.append('model', 'Desire');
body.append('owner', '98367463-ce48-4e51-8e29-f49f0b1f2c0c');
body.append('code', '2');
body.append('current_km_reading', 'quidem');
body.append('chassis_number', '28798784');
body.append('ownership_type', 'private');
body.append('driver_name', 'Kebede');
body.append('driver_phone', '0911888888');
body.append('current_km_reding', '25K');
body.append('vehicle_image', document.querySelector('input[name="vehicle_image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "Vehicle created successfully",
"count": "25",
"status": "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.
Get Vehicles of logged-in user
This api returns a collection of vehicles belonging to the logged in user
Example request:
curl --request GET \
--get "http://localhost/api/vehicles/get-my-vehicles?offset=10&limit=20&search=Desire" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/get-my-vehicles"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
};
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": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "",
"count": "25",
"status": "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.
Get Vehicles of a specific owner
This api returns a collection of vehicles belonging to a specific owner
Example request:
curl --request GET \
--get "http://localhost/api/vehicles/get-by-owner/incidunt?offset=10&limit=20&search=Desire" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/get-by-owner/incidunt"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
};
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": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "",
"count": "25",
"status": "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.
Get Vehicles of a specific booking
This api returns a collection of vehicles belonging to a specific booking
Example request:
curl --request GET \
--get "http://localhost/api/vehicles/get-by-booking/quis?offset=10&limit=20&search=Desire" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/get-by-booking/quis"
);
const params = {
"offset": "10",
"limit": "20",
"search": "Desire",
};
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": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "",
"count": "25",
"status": "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.
Get Number of Vehicles by status of a specific owner
This api returns a collection of name of status and number of vehicles that have that specific status of a given owner.
Example request:
curl --request GET \
--get "http://localhost/api/vehicles/get-report-by-status/velit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/get-report-by-status/velit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "",
"count": "25",
"status": "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.
Get a Vehicle
The api returns a single instance of a Vehicle
Example request:
curl --request GET \
--get "http://localhost/api/vehicles/9af6d80b-3152-4f9f-958c-710df03406f0" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/9af6d80b-3152-4f9f-958c-710df03406f0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "",
"count": "25",
"status": "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.
Update Vehicle
This api allows you to update a vehicle
Example request:
curl --request POST \
"http://localhost/api/vehicles/update/doloribus" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "plate_number=C23232"\
--form "color=white"\
--form "model=Desire"\
--form "code=2"\
--form "current_km_reading=nostrum"\
--form "chassis_number=28798784"\
--form "ownership_type=private"\
--form "driver_name=Kebede"\
--form "driver_phone=0911888888"\
--form "owner=98367463-ce48-4e51-8e29-f49f0b1f2c0c"\
--form "current_km_reding=25K"\
--form "vehicle_image=@/tmp/phpOk2qSj" const url = new URL(
"http://localhost/api/vehicles/update/doloribus"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('plate_number', 'C23232');
body.append('color', 'white');
body.append('model', 'Desire');
body.append('code', '2');
body.append('current_km_reading', 'nostrum');
body.append('chassis_number', '28798784');
body.append('ownership_type', 'private');
body.append('driver_name', 'Kebede');
body.append('driver_phone', '0911888888');
body.append('owner', '98367463-ce48-4e51-8e29-f49f0b1f2c0c');
body.append('current_km_reding', '25K');
body.append('vehicle_image', document.querySelector('input[name="vehicle_image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9af6d80b-3152-4f9f-958c-710df03406f0",
"plate_number": "C439318",
"color": "black",
"model": "Desire",
"code": "4",
"status": "booked",
"current_km_reading": "255878 km",
"chassis_number": "84841sd8f454fd84s5df48555151",
"ownership_type": "private",
"file_name": "http://localhost/storage/vehicles/gswi6Dr4ZhbsDmx4iMdQ9IDLuzSyVN5XTR2zzr1V.png",
"driver_name": "abebe",
"driver_phone": "+251978555528",
"owner": {
"id": "9af6d7a2-5905-4f34-986f-cec7d3912a5a",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"address": "abc street",
"is_company": true,
"user": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "6 days ago"
},
"message": "Vehicle updated successfully",
"count": "25",
"status": "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.
Delete a Vehicle
This api allows you to delete a vehicle
Example request:
curl --request DELETE \
"http://localhost/api/vehicles/delete/alias" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicles/delete/alias"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Vehicle Intake Item
Get Vehicle intake items
This api returns a collection of Vehicle intake items
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intake-items?offset=10&limit=20&search=%E1%8B%A8%E1%8D%8A%E1%89%B5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intake-items"
);
const params = {
"offset": "10",
"limit": "20",
"search": "የፊት",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Vehicle intake items
This api returns a collection of vehicle intake items without pagination and searching
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intake-items/get-all?offset=10&limit=20&search=%E1%8B%A8%E1%8D%8A%E1%89%B5" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intake-items/get-all"
);
const params = {
"offset": "10",
"limit": "20",
"search": "የፊት",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 vehicle intake item
This api allows you to create a new vehicle intake item
Example request:
curl --request POST \
"http://localhost/api/vehicle-intake-items/store" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"item\": \"consectetur\"
}"
const url = new URL(
"http://localhost/api/vehicle-intake-items/store"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"item": "consectetur"
};
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.
Get vehicle intake item
This api returns a single instance of a vehicle intake item
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intake-items/00a734d3-d046-4168-8141-345637e24213" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intake-items/00a734d3-d046-4168-8141-345637e24213"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Update vehicle intake item
This api allows you to update a vehicle intake item
Example request:
curl --request PUT \
"http://localhost/api/vehicle-intake-items/update/qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"item\": \"quos\"
}"
const url = new URL(
"http://localhost/api/vehicle-intake-items/update/qui"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"item": "quos"
};
fetch(url, {
method: "PUT",
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.
Change status
This api allows you to update the status of a vehicle intake item
Example request:
curl --request PUT \
"http://localhost/api/vehicle-intake-items/change-status/quos" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_active\": true
}"
const url = new URL(
"http://localhost/api/vehicle-intake-items/change-status/quos"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_active": true
};
fetch(url, {
method: "PUT",
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.
Delete vehicle intake item
This api allows you to delete a vehicle intake item
Example request:
curl --request DELETE \
"http://localhost/api/vehicle-intake-items/delete/dolor" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intake-items/delete/dolor"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Vehicle intake
Get Vehicle intakes
This api returns a collection of vehicle intakes
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 a vehicle intake
This api returns a single instance of vehicle intake
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes/9afca3ce-6bd4-43b1-8154-fe9521d8ee21" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/9afca3ce-6bd4-43b1-8154-fe9521d8ee21"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Vehicle intake by booking
This api returns a single vehicle intake that belongs to a booking
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes/get-by-booking/earum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/get-by-booking/earum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": "9afca3ce-6bd4-43b1-8154-fe9521d8ee21",
"remark": "",
"amount_of_oil": "HALF",
"distance_covered": 50000,
"date_of_intake": "01 Jan, 2024",
"received_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"vehicle": null,
"booking": null,
"images": [],
"vehicle_intake_items": [
{
"id": "00a734d3-d046-4168-8141-345637e24213",
"item": "የመሪ ዘይት ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "023546e7-3b83-4fac-a66b-96fb1f11af7b",
"item": "የሬዲዮ አንቴና",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "06d388ad-7a68-4b87-9d3e-e84015ef9974",
"item": "የፊት ታርጋ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "0b714d52-85d8-45c7-93fe-7f24a153ae43",
"item": "የሁዋላ ፓርኪንግ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "0e7dfdd4-7a0b-4b66-a166-51ca529f931b",
"item": "የሁዋላ ታርጋ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "13935863-9870-49ad-b4a3-d2fbafe73cab",
"item": "የሞተር ዘይት መለኪያ ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "14d48ded-5cd3-46fe-9269-3c07076358df",
"item": "የመሬት ንጣፍ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "15ed25c4-3b3c-4d76-a56e-8d2544b4845b",
"item": "የኃላ መመልከቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "1820b5a4-e1f9-443f-b58f-dd6e6077a236",
"item": "ጎማ መፍቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "1903a59f-0778-4b95-b99d-cb7c0b0bc6fd",
"item": "የእሳት ማጥፊያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "1cd1ad9a-1612-4e61-84ab-79368e95807a",
"item": "ፊውዝ ቦክስ ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "1ebc57d8-8af1-4099-8010-a50ebb09fca3",
"item": "የሳልቫትዮ ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "1ff18d07-d0dc-485e-97ba-5dfc7288d05e",
"item": "የግንባር መስታወት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "2331722d-10c9-4d1c-a0fd-f7931a2a77d5",
"item": "የጣሪያ መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "279edec2-4051-4217-95c0-d3c867c62ab9",
"item": "የፊት ፈረፋንጎ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "3801fbc2-f5af-47d9-8c86-7284ce6883dc",
"item": "የሁዋላ መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "3c3ff25b-164e-4463-9e60-b06693abb5a5",
"item": "የጎማ ብሎኖች",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "42b2ac5d-ba0e-4e4b-bcd4-ba9c626a228d",
"item": "የመስታወት ማዽጃ ውሃ ታንከር",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "493ad8a7-8b27-41b0-9a59-316e2a247a8f",
"item": "ስኮርት ጎማ መውጫ ና ማውረጃ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "49f30af0-0fcf-4367-8b7f-93b7787973cc",
"item": "የሲጋራ መለኮሻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "529666e2-a6a8-4603-a984-f7ed78d9f4ef",
"item": "ቴፕ/ሬዲዮ/",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "5520e659-507d-45c4-9596-bc6be6fc135b",
"item": "ሽታ ማጥፊያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "568ea866-ae86-4538-89cf-15ee07d508f9",
"item": "ኤክስፖንሽን ታንከር ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "59b642cc-ddd8-41db-8572-1aac41f293cb",
"item": "የታርጋ መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "608a6df5-ba45-4537-bfd7-571c756a81c5",
"item": "የኮፈን መክፈቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "62eb514c-4eb1-4658-8cbb-de82064c468b",
"item": "የመጀመሪያ እርዳታ መስጫ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "675aaee8-2ab0-4be4-9fbe-2777c10ddc2b",
"item": "የፀሃይ መከላከያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "7571c5ed-cc8f-4df6-980e-a40c03ff431f",
"item": "የፊት የዝናብ መጥረጊያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "769ec294-433f-4f78-b70e-172b62792871",
"item": "ስኮርት ጎማ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "795baf0c-9f4c-4b64-bc96-c9392c285736",
"item": "የበር እጄታዎች",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "7af9877a-a207-4c1d-8e7b-8a5bf1c1ce53",
"item": "የሁዋላ የዝናብ መጥረጊያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "7be97218-e99a-4304-b107-84c68db901dc",
"item": "የፍሬሲዮን መረገጫ ጎማ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "7c6b73a6-539a-4a69-b717-89e7cfc0f29b",
"item": "የባትሪ ከቨር",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "8ad788b9-ded1-4e66-96fd-264b52608417",
"item": "ፊውዝ ሪሌይ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "8c023c1f-708b-4a51-89a5-be2bada283c8",
"item": "የፍሬን መረገጫ ጎማ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "9047f9a3-fe19-4e80-abeb-c0fc8026c23f",
"item": "ማንፀባረቂያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "93cac079-a385-4958-b752-7f30d607c705",
"item": "የፊት መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "9548a36a-605f-4a78-88a0-98d7b345a2df",
"item": "የሁዋላ ፍሬቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "96af20f8-be9e-4021-b039-f292fdfe739d",
"item": "ክላሲክ ከነስዊች",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "988aa98a-ca50-49c5-b076-5569441c8400",
"item": "የዳሽ ቦርድ ልብስ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "9a7292c1-ba3b-43e6-9f9e-3b4184f9c48d",
"item": "የጎማ ቸርኬ ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "9cb022ca-1412-4f6d-91f7-49c8eb6cdf51",
"item": "የፊት ፓርኪንግ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "9d32b8cb-053e-42eb-b5e2-2625dacb7de0",
"item": "የውሃ መርጫ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "ada3361c-a784-4ddd-92c1-b105b416d2ee",
"item": "የሞተር ዘይት መለኪያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "b098b0c3-6a8f-4aac-924d-37ad01e2a0aa",
"item": "የጭቃ መከላከያ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "b3bde075-f10a-47d0-ae47-9b27942d90c5",
"item": "የበሮች መስታወት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "b64c59f8-9640-4b33-9a45-e1a64392dce9",
"item": "የማርሽ እጄታ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "c74f1a5a-bfcc-4606-bf05-7c23ba4da12d",
"item": "የመስታወት ማዽጃ ውሃ ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "c87369d8-e61f-4787-b5c0-459f438cad5b",
"item": "የፊት ፍፌቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "cbfcbf9a-3b20-4014-90ba-0524d190f0cd",
"item": "የመስታወት ማውጫ ማውረጃ 4ቱም",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "d272afec-9b75-4c18-9379-98eb35c83d8c",
"item": "የፍሬን ዘይት ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "d2d150dd-7754-4ebf-8afb-119f6e15aef6",
"item": "የጎማ ፍሬን ሎክ [ሮዴታ]",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "d529b335-7804-4985-a827-a92592417d05",
"item": "የጣሪያ መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "dd8243f7-765e-47ba-9490-166f6c56faf8",
"item": "የበር መክፈቻ እጄታ 4ቱም",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "eda6b33e-c33c-4820-8565-7c04e42529a7",
"item": "ክሪክ ከነማንሻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "f71dedc0-4bf6-4f64-8212-d2050f6c135a",
"item": "ራዲያተር ክዳን",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "f901cac7-4eb6-4f05-9ab2-e3b4edac4415",
"item": "የወንበር ልብስ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "fcbbf455-7fb3-48db-89a7-53c79c1eab38",
"item": "የፈረፋንጎ መብራት",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
},
{
"id": "fe623090-641b-40ae-98cb-a0821d561f2d",
"item": "የጎማ ማመልከቻ",
"is_active": true,
"status": false,
"created_by": null,
"created_at": "6 days ago"
}
],
"work_order": {
"id": "9afca40c-ea08-4f77-8a7c-0f08297211e3",
"total_lubrication_cost": 7000,
"total_parts_cost": 1000,
"total_labour_cost": 0,
"total_other_charges": 0,
"total": 8000,
"status": "INITIATED",
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "3 days ago",
"work_order_details": [
{
"id": "9afca44a-3ac4-4109-8350-43975d1779c0",
"is_approved": "",
"system_code": "17",
"work_accomplished_code": "10",
"part_no_description": "tire",
"quantity": 5,
"unit_cost": 200,
"extended_cost": 1000,
"status": "PENDING",
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "3 days ago",
"part_failure_code": "13"
}
],
"lubrications": [
{
"id": "9afca4cf-12ea-4c77-b719-33819375352c",
"is_approved": "unassigned",
"oil_type": "Other Oil",
"quantity": 2,
"measurement": "litter",
"unit": 3500.55,
"extended": 7000,
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "3 days ago"
}
],
"other_charges": [],
"vehicle": " - ",
"owner": null,
"days_to_complete": "In progress"
},
"created_by": {
"id": "9af6d7a2-5611-4eb6-a64b-3b26794210b5",
"name": "Abebe",
"email": "abebe@test421.com",
"phone": "+251930605974",
"is_active": true,
"type": "owner",
"created_by": {
"id": "9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c",
"name": "Default Account",
"email": "admin@test.com",
"phone": "+251911111111",
"is_active": true,
"type": "employee",
"created_by": null,
"created_at": "6 days ago",
"roles": [
"Super Admin"
]
},
"created_at": "6 days ago",
"roles": [
"Owner"
]
},
"created_at": "3 days ago"
},
"message": "",
"count": "1",
"status": "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.
Create vehicle intake
This api allows you to create a vehicle intake
Example request:
curl --request POST \
"http://localhost/api/vehicle-intakes/store" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "remark=enim"\
--form "amount_of_oil=5"\
--form "distance_covered=6"\
--form "vehicle_id=tenetur"\
--form "checklist=ipsam"\
--form "images[]=@/tmp/phpRGK5Ul" const url = new URL(
"http://localhost/api/vehicle-intakes/store"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('remark', 'enim');
body.append('amount_of_oil', '5');
body.append('distance_covered', '6');
body.append('vehicle_id', 'tenetur');
body.append('checklist', 'ipsam');
body.append('images[]', document.querySelector('input[name="images[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
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.
Get Vehicle intakes by vehicle
This api returns a collection of vehicle intakes belonging to a vehicle
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes/get-by-vehicle/laborum?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/get-by-vehicle/laborum"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Vehicle intakes by vehicle id and booking id
This api returns a collection of vehicle intakes of a specific vehicle that belongs to a booking
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes/get-by-vehicle-and-booking/perferendis/qui?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/get-by-vehicle-and-booking/perferendis/qui"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Add Remark
This api allows you to add remarks to already created vehicle intakes
Example request:
curl --request PUT \
"http://localhost/api/vehicle-intakes/add-remark/mollitia" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"remark\": \"asperiores\"
}"
const url = new URL(
"http://localhost/api/vehicle-intakes/add-remark/mollitia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"remark": "asperiores"
};
fetch(url, {
method: "PUT",
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.
Update vehicle intake
This api allows you to update a vehicle intake
Example request:
curl --request PUT \
"http://localhost/api/vehicle-intakes/update/officia" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount_of_oil\": 20,
\"distance_covered\": 17,
\"vehicle_id\": \"ipsam\",
\"remark\": \"sit\"
}"
const url = new URL(
"http://localhost/api/vehicle-intakes/update/officia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount_of_oil": 20,
"distance_covered": 17,
"vehicle_id": "ipsam",
"remark": "sit"
};
fetch(url, {
method: "PUT",
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.
Delete Vehicle intake
This api allows you to delete a vehicle intake
Example request:
curl --request DELETE \
"http://localhost/api/vehicle-intakes/delete/voluptate" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/delete/voluptate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Get by status
This api returns a collection of vehicle intakes that belongs to a specific vehicle and have a specific vehicle intake items status
Example request:
curl --request GET \
--get "http://localhost/api/vehicle-intakes/get-by-status/architecto/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/vehicle-intakes/get-by-status/architecto/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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.
Work Order
Get Work Orders
This api returns a collection of Work Orders.
Example request:
curl --request GET \
--get "http://localhost/api/work-orders?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Work Orders of a specific Owner
This api returns a collection of Work Orders that belongs to the owner that is logged in .
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/get-my-work-orders?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/get-my-work-orders"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Work Order History
This api returns a collection of completed Work Orders that belongs to the vehicle of the logged in owner.
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/get-history/quo?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/get-history/quo"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 a Work Order
This api returns a single instance of a work order
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/9afca40c-ea08-4f77-8a7c-0f08297211e3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/9afca40c-ea08-4f77-8a7c-0f08297211e3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Work Orders of a specific Vehicle
This api returns a collection of Work Orders that belongs to the owner that is logged in .
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/vehicle/9af6d80b-3152-4f9f-958c-710df03406f0?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/vehicle/9af6d80b-3152-4f9f-958c-710df03406f0"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Work Orders of a specific Vehicle Intake
This api returns a collection of Work Orders that belongs to a specific vehicle intake.
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/vehicle-intake/9afca3ce-6bd4-43b1-8154-fe9521d8ee21?offset=10&limit=20" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/vehicle-intake/9afca3ce-6bd4-43b1-8154-fe9521d8ee21"
);
const params = {
"offset": "10",
"limit": "20",
};
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 (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 work order
This api allows you to create work orders
Example request:
curl --request POST \
"http://localhost/api/work-orders/store" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"vehicle_intake_id\": \"omnis\"
}"
const url = new URL(
"http://localhost/api/work-orders/store"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"vehicle_intake_id": "omnis"
};
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.
Update work order
This api allows you to update a work order
Example request:
curl --request PUT \
"http://localhost/api/work-orders/update/quasi" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"total_labour_cost\": 12000,
\"status\": \"12000.00\"
}"
const url = new URL(
"http://localhost/api/work-orders/update/quasi"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"total_labour_cost": 12000,
"status": "12000.00"
};
fetch(url, {
method: "PUT",
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.
PUT api/work-orders/change-status/{id}
Example request:
curl --request PUT \
"http://localhost/api/work-orders/change-status/dicta" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/change-status/dicta"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
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.
Delete Work Order
This api allows you to delete a work order
Example request:
curl --request DELETE \
"http://localhost/api/work-orders/delete/tenetur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/delete/tenetur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Work Order Details
Get Work Order Details
This api returns a collection of Work order details for a work order
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/details/tempore" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/details/tempore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 a Work order detail
This api returns a single instance of a work order detail.
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/details/show/minus" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/details/show/minus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Work order detail
This api allows you to create a new Work order detail
Example request:
curl --request POST \
"http://localhost/api/work-orders/details/store/adipisci" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"system_code\": 8,
\"work_accomplished_code\": 8,
\"part_no_description\": \"ozsxjsnyrumsfocjwzvrnh\",
\"quantity\": 8,
\"unit_cost\": 8,
\"part_failure_code\": 8
}"
const url = new URL(
"http://localhost/api/work-orders/details/store/adipisci"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"system_code": 8,
"work_accomplished_code": 8,
"part_no_description": "ozsxjsnyrumsfocjwzvrnh",
"quantity": 8,
"unit_cost": 8,
"part_failure_code": 8
};
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.
Update Work order detail
This api allows you to update work order details
Example request:
curl --request PUT \
"http://localhost/api/work-orders/details/update/quis" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"system_code\": 8,
\"work_accomplished_code\": 8,
\"part_no_description\": \"xovrdtjvk\",
\"quantity\": 8,
\"unit_cost\": 8,
\"part_failure_code\": 8
}"
const url = new URL(
"http://localhost/api/work-orders/details/update/quis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"system_code": 8,
"work_accomplished_code": 8,
"part_no_description": "xovrdtjvk",
"quantity": 8,
"unit_cost": 8,
"part_failure_code": 8
};
fetch(url, {
method: "PUT",
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.
Delete Work order detail
This api allows you to delete a work order detail
Example request:
curl --request DELETE \
"http://localhost/api/work-orders/details/delete/ipsa" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/details/delete/ipsa"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Change Status
This api allows you to change the status of the work order detail
Example request:
curl --request PUT \
"http://localhost/api/work-orders/details/change-status/aperiam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"pending\"
}"
const url = new URL(
"http://localhost/api/work-orders/details/change-status/aperiam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "pending"
};
fetch(url, {
method: "PUT",
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.
Change Approval
This api allows you to change the approval for the work order detail request
Example request:
curl --request PUT \
"http://localhost/api/work-orders/details/change-approval/9afca44a-3ac4-4109-8350-43975d1779c0" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"approved\"
}"
const url = new URL(
"http://localhost/api/work-orders/details/change-approval/9afca44a-3ac4-4109-8350-43975d1779c0"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "approved"
};
fetch(url, {
method: "PUT",
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.
Lubrication
Lubrications
This api returns all lubrications registered under a work order.
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/lubrications/9afca4cf-12ea-4c77-b719-33819375352c" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/lubrications/9afca4cf-12ea-4c77-b719-33819375352c"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 A Lubrication
This api returns a single instance of Lubrication
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/lubrications/show/eum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/lubrications/show/eum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 new Lubrication
This api allows you to create a new Lubrication. The lubrication will be added to the work order.
Example request:
curl --request POST \
"http://localhost/api/work-orders/lubrications/store/praesentium" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"oil_type\": \"Engine Oil\",
\"measurement\": \"litter\",
\"quantity\": 0,
\"unit\": 0
}"
const url = new URL(
"http://localhost/api/work-orders/lubrications/store/praesentium"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oil_type": "Engine Oil",
"measurement": "litter",
"quantity": 0,
"unit": 0
};
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.
Update a Lubrication
This api allows you to update a Lubrication.
Example request:
curl --request PUT \
"http://localhost/api/work-orders/lubrications/update/in" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"oil_type\": \"Engine Oil\",
\"measurement\": \"litter\",
\"quantity\": 0,
\"unit\": 0
}"
const url = new URL(
"http://localhost/api/work-orders/lubrications/update/in"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"oil_type": "Engine Oil",
"measurement": "litter",
"quantity": 0,
"unit": 0
};
fetch(url, {
method: "PUT",
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.
Delete a lubrication
This api allows you to delete a lubrication
Example request:
curl --request DELETE \
"http://localhost/api/work-orders/lubrications/delete/explicabo" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/lubrications/delete/explicabo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Change Approval
This api allows you to change the approval for the lubrication request
Example request:
curl --request PUT \
"http://localhost/api/work-orders/lubrications/change-approval/9afca4cf-12ea-4c77-b719-33819375352c" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"approved\"
}"
const url = new URL(
"http://localhost/api/work-orders/lubrications/change-approval/9afca4cf-12ea-4c77-b719-33819375352c"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "approved"
};
fetch(url, {
method: "PUT",
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.
Other Charges
Get Other charges
This api returns a collection of other charges of a work order
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/other-charges/expedita" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/other-charges/expedita"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Other Charge
This api returns a single instance of other charge
Example request:
curl --request GET \
--get "http://localhost/api/work-orders/other-charges/show/fugit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/other-charges/show/fugit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"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 Other Charge
Example request:
curl --request POST \
"http://localhost/api/work-orders/other-charges/store/explicabo" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"price\": 5000.75,
\"description\": \"5000.75\"
}"
const url = new URL(
"http://localhost/api/work-orders/other-charges/store/explicabo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"price": 5000.75,
"description": "5000.75"
};
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.
Update Other charge.
This api allows you to update a charge
Example request:
curl --request PUT \
"http://localhost/api/work-orders/other-charges/update/illum" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"price\": 5000.75,
\"description\": \"5000.75\"
}"
const url = new URL(
"http://localhost/api/work-orders/other-charges/update/illum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"price": 5000.75,
"description": "5000.75"
};
fetch(url, {
method: "PUT",
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.
Delete Other Charge
Example request:
curl --request DELETE \
"http://localhost/api/work-orders/other-charges/delete/labore" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/work-orders/other-charges/delete/labore"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
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.
Change Approval
This api allows you to change the approval for the other charges request
Example request:
curl --request PUT \
"http://localhost/api/work-orders/other-charges/change-approval/praesentium" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"approved\"
}"
const url = new URL(
"http://localhost/api/work-orders/other-charges/change-approval/praesentium"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "approved"
};
fetch(url, {
method: "PUT",
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.