MENU navbar-image

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());

Request      

POST api/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name of the owner Example: possimus

phone   string  optional  

Phone of the owner Example: et

email   email  optional  

Email of the owner Example: gferry@example.net

password   string  optional  

Password for the owner Example: 5<V=D<x\[w

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());

Request      

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user. Example: +251911111111

password   string  optional  

Password for the user. Example: 12345678

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());

Request      

POST api/auth/check-user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user Example: aut

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());

Request      

POST api/auth/reset-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user Example: perferendis

password   string  optional  

Password for the user Example: pj*0X]7!p:})

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());

Request      

POST api/auth/refresh

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user Example: quibusdam

password   string  optional  

Password for the user Example: $yd~zY-Rd+m:

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());

Request      

POST api/auth/send-otp

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user Example: assumenda

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());

Request      

POST api/auth/verify-otp

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   string  optional  

Phone of the user Example: recusandae

code   string  optional  

OTP sent to the user Example: accusamus

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());

Request      

POST api/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/auth/change-profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

Name of the user(owner) Example: esse

email   email  optional  

Email of the user(owner) Example: witting.lizzie@example.net

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."
}
 

Request      

GET api/auth/get-profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/auth/change-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

old_password   string  optional  

Old password of the user Example: expedita

new_password   string  optional  

New password of the user Example: placeat

confirm_password   string  optional  

Confirm password for the user Example: nostrum

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"
}
 

Request      

GET api/bookings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/bookings/show/{booking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

booking_id   string   

The ID of the booking. Example: 9af6d87b-c879-4734-8bf6-b8210f282e48

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"
}
 

Request      

GET api/bookings/get-owner-bookings

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/bookings/get-by-owners/{owner_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

owner_id   string   

The ID of the owner. Example: 9af6d735-923f-46d0-933b-8085b48e05cc

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"
}
 

Request      

GET api/bookings/get-by-vehicle/{vehicle_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

vehicle_id   string   

The ID of the vehicle. Example: 9af6d80b-3152-4f9f-958c-710df03406f0

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"
}
 

Request      

POST api/bookings/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name of the owner/driver. Example: Abebe

phone   string   

Phone Number of the owner/driver. Example: +251911545454

email   string  optional  

Email of the owner/driver. Example: driver@gmail.com

vehicle_ids   object   
note   string   

Any notes for the booking. Example: notes

booking_date   string   

Booking date. Example: 10/25/2023

booking_time   string   

Booking Time. Example: 12:30 PM

vehicle_id   string  optional  

Id of the vehicle. Example: f6aeb215-5280-40b9-b059-3e7caf2b23c7

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"
}
 

Request      

PUT api/bookings/update/{booking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

booking_id   string  optional  

Id of the booking to be updated. Example: ducimus

Body Parameters

name   string   

Name of the owner/driver. Example: Abebe

phone   string   

Phone Number of the owner/driver. Example: +251911545454

email   string  optional  

Email of the owner/driver. Example: driver@gmail.com

vehicle_ids   object   
note   string   

Any notes for the booking. Example: notes

booking_date   string   

Booking date. Example: 10/25/2023

booking_time   string   

Booking Time. Example: 12:30 PM

vehicle_id   string  optional  

Id of the vehicle. Example: f6aeb215-5280-40b9-b059-3e7caf2b23c7

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());

Request      

DELETE api/bookings/delete/{booking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

booking_id   string  optional  

Id of the booking to be deleted. Example: aperiam

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."
}
 

Request      

GET api/work-order-code

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/test/{ownerId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

ownerId   string   

Example: qui

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."
}
 

Request      

GET api/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/owners

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: abebe

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."
}
 

Request      

GET api/owners/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the owner. Example: 9af6d735-923f-46d0-933b-8085b48e05cc

owner_id   string   

ID of the owner to be returned Example: ullam

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());

Request      

POST api/owners/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name of the owner Example: aliquid

email   email  optional  

Email of the owner Example: christ08@example.com

phone   string  optional  

Phone of the owner Example: laboriosam

is_company   boolean  optional  

indicating whether the owner is a company or individual Example: true

address   string  optional  

address of the owner Example: non

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());

Request      

PUT api/owners/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: necessitatibus

Body Parameters

name   string   

Name of the owner Example: tempore

email   email  optional  

Email of the owner Example: qlabadie@example.org

phone   string  optional  

Phone of the owner Example: unde

is_company   boolean  optional  

indicating whether the owner is a company or individual Example: true

address   string  optional  

address of the owner Example: laborum

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());

Request      

DELETE api/owners/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: aperiam

owner_id   string   

ID of the owner to be deleted Example: magnam

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."
}
 

Request      

GET api/permissions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/permissions/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the permission. Example: 9af6d6ce-297d-4ad3-b3d1-bb19f34dba9b

permission_id   string   

ID of the permission to be deleted Example: iusto

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
    }
}
 

Request      

GET api/summary

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
    }
}
 

Request      

GET api/vehicle-summary

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
    }
}
 

Request      

GET api/work-order-summary

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/reports/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/vehicle-export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/owners

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: abebe

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/owners/export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: abebe

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/vehicle-intakes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: quidem

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/vehicle-intakes/export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: sequi

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/work-orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/work-orders/export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: eos

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/work-order-details

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: ipsa

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/reports/work-order-details/export

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: ex

filter   string[]  optional  

Array of array of filter parameters that are used to filter the records returned from the API request

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."
}
 

Request      

GET api/get-all-roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/roles/attach-permissions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

role_id   string   

ID of the role that the permissions are going to be attached to Example: optio

permissions   string[]   

list of permission ids to be attached to the role.

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."
}
 

Request      

GET api/roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: owner

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());

Request      

POST api/roles/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name of the role to be created. Example: Owner

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."
}
 

Request      

GET api/roles/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the role. Example: 2add60db-3c90-4f07-a609-4ecc3700728d

role_id   string   

ID of the role to be returned Example: molestias

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());

Request      

PUT api/roles/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: rerum

role_id   string   

ID of the role to be updated Example: dolorem

Body Parameters

name   string   

Name of the role to be created. Example: Owner

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());

Request      

DELETE api/roles/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: assumenda

role_id   string   

ID of the role to be deleted Example: reprehenderit

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."
}
 

Request      

GET api/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 0

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 10

search   string  optional  

Field to search the records returned from the API request. You can search by using name, phone number. Defaults to null. Example: Abebe

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());

Request      

POST api/users/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. You can search by using name, phone number. Defaults to null. Example: Abebe

Body Parameters

name   string   

Example: quaerat

email   string  optional  
phone   string   

Must match the regex /^([+][2][5]1[0-9]{8}$)/. Example: [251744272277$)

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());

Request      

POST api/users/sync-roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

user_id   string  optional  

Id of the user Example: sapiente

roles   string[]  optional  

Array of role id to be synced

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."
}
 

Request      

GET api/users/change-user-status/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the change user status. Example: placeat

Query Parameters

user_id   string  optional  

Id of the user Example: omnis

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."
}
 

Request      

GET api/users/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the user. Example: 9af6d6cc-91ee-4b97-a1b1-0cdbe1c5a87c

Query Parameters

user_id   string  optional  

Id of the returned user Example: et

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());

Request      

PUT api/users/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: et

Query Parameters

user_id   string  optional  

The ID of the user to be updated Example: est

Body Parameters

name   string   

Updated name of the user. Example Sosh Example: occaecati

email   string  optional  
phone   string   

Updated phone of the user. Example +251911111111 Example: omnis

type   string   

Updated type of the user, sholud be individual or company. Example individual Example: enim

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());

Request      

DELETE api/users/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: recusandae

Query Parameters

user_id   string  optional  

Id of the user to be deleted Example: aut

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"
}
 

Request      

GET api/vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

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"
}
 

Request      

POST api/vehicles/store

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

plate_number   string   

Plate number of the vehicle. Example: C23232

color   string   

Color of the vehicle. Example: white

model   string   

Model of the vehicle. Example: Desire

owner   string   

ID of the owner of the vehicle. Example: 98367463-ce48-4e51-8e29-f49f0b1f2c0c

code   string   

Plate code of the vehicle. Example: 2

current_km_reading   string   

Example: quidem

chassis_number   string   

Chassis Number of the vehicle. Example: 28798784

ownership_type   string   

Ownership type of the vehicle. One of private, company or rental Example: private

driver_name   string   

Driver name of the vehicle. Example: Kebede

driver_phone   string   

Driver phone number of the vehicle. Example: 0911888888

current_km_reding   string   

Current KM reading of the vehicle. Example: 25K

vehicle_image   file   

Image of the vehicle. Example: /tmp/phpyuqAom

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"
}
 

Request      

GET api/vehicles/get-my-vehicles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

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"
}
 

Request      

GET api/vehicles/get-by-owner/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the get by owner. Example: incidunt

owner_id   string   

ID of the owner of the vehicles Example: et

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

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"
}
 

Request      

GET api/vehicles/get-by-booking/{booking_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

booking_id   string   

ID of the booking of the vehicles Example: quis

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: Desire

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"
}
 

Request      

GET api/vehicles/get-report-by-status/{ownerId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

ownerId   string   

Example: velit

owner_id   string   

ID of the owner of the vehicles Example: est

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"
}
 

Request      

GET api/vehicles/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the vehicle. Example: 9af6d80b-3152-4f9f-958c-710df03406f0

vehicle_id   string   

ID of the vehicle to be returned Example: sit

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"
}
 

Request      

POST api/vehicles/update/{id}

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: doloribus

vehicle_id   string   

ID of the vehicle to be deleted. Example: nam

Body Parameters

plate_number   string   

Plate number of the vehicle. Example: C23232

color   string   

Color of the vehicle. Example: white

model   string   

Model of the vehicle. Example: Desire

code   string   

Plate code of the vehicle. Example: 2

current_km_reading   string   

Example: nostrum

chassis_number   string   

Chassis Number of the vehicle. Example: 28798784

ownership_type   string   

Ownership type of the vehicle. One of private, company or rental Example: private

driver_name   string   

Driver name of the vehicle. Example: Kebede

driver_phone   string   

Driver phone number of the vehicle. Example: 0911888888

owner   string   

ID of the owner of the vehicle. Example: 98367463-ce48-4e51-8e29-f49f0b1f2c0c

current_km_reding   string   

Current KM reading of the vehicle. Example: 25K

vehicle_image   file   

Image of the vehicle. Example: /tmp/phpOk2qSj

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());

Request      

DELETE api/vehicles/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: alias

vehicle_id   string   

ID of the vehicle to be deleted Example: eos

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."
}
 

Request      

GET api/vehicle-intake-items

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: የፊት

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."
}
 

Request      

GET api/vehicle-intake-items/get-all

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

search   string  optional  

Field to search the records returned from the API request. Defaults to null. Example: የፊት

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());

Request      

POST api/vehicle-intake-items/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

item   string   

The name of the item of the vehicle intake item Example: consectetur

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."
}
 

Request      

GET api/vehicle-intake-items/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the vehicle intake item. Example: 00a734d3-d046-4168-8141-345637e24213

vehicle_intake_item_id   string   

ID of the vehicle intake item to be returned Example: consequatur

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());

Request      

PUT api/vehicle-intake-items/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: qui

vehicle_intake_item_id   string   

ID of the vehicle intake item to be updated Example: laboriosam

Body Parameters

item   string   

The name of the item of the vehicle intake item Example: quos

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());

Request      

PUT api/vehicle-intake-items/change-status/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the change status. Example: quos

vehicle_intake_item_id   string   

ID of the vehicle intake item to be updated Example: qui

Body Parameters

is_active   boolean   

A boolean value indicating whether the vehicle intake item is active or not Example: true

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());

Request      

DELETE api/vehicle-intake-items/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: dolor

vehicle_intake_item_id   string   

ID of the vehicle intake item to be deleted Example: voluptate

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."
}
 

Request      

GET api/vehicle-intakes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/vehicle-intakes/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the vehicle intake. Example: 9afca3ce-6bd4-43b1-8154-fe9521d8ee21

vehicle_intake_id   string   

ID of the vehicle intake to be returned Example: nihil

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"
}
 

Request      

GET api/vehicle-intakes/get-by-booking/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the get by booking. Example: earum

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());

Request      

POST api/vehicle-intakes/store

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

remark   string  optional  

Remark of the vehicle intake Example: enim

amount_of_oil   integer   

The amount of oil the vehicle has at the time of intake Example: 5

distance_covered   integer   

The distance covered by the vehicle at the time of intake Example: 6

vehicle_id   string   

ID of the vehicle Example: tenetur

images   file[]  optional  

Images of the vehicle at the time of intake

checklist   string  optional  

IDs of the vehicle intake items that are working or in a good condition Example: ipsam

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."
}
 

Request      

GET api/vehicle-intakes/get-by-vehicle/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the get by vehicle. Example: laborum

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/vehicle-intakes/get-by-vehicle-and-booking/{bookingId}/{vehicleId}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bookingId   string  optional  

uuid required The ID of the booking Example: perferendis

vehicleId   string  optional  

uuid required The ID of the vehicle Example: qui

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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());

Request      

PUT api/vehicle-intakes/add-remark/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the add remark. Example: mollitia

vehicle_intake_id   string   

ID of the vehicle intake that contains the remark Example: quod

Body Parameters

remark   string   

The remark of the vehicle intake. Example: asperiores

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());

Request      

PUT api/vehicle-intakes/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: officia

vehicle_intake_id   string   

ID of the vehicle intake to be updated Example: non

Body Parameters

amount_of_oil   integer   

The amount of oil the vehicle has at the time of intake Example: 20

distance_covered   integer   

The distance covered by the vehicle at the time of intake Example: 17

vehicle_id   string   

ID of the vehicle Example: ipsam

remark   string  optional  

Remark of the vehicle intake Example: sit

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());

Request      

DELETE api/vehicle-intakes/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: voluptate

vehicle_intake_id   string   

ID of the vehicle intake to be deleted Example: provident

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."
}
 

Request      

GET api/vehicle-intakes/get-by-status/{id}/{status}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the get by status. Example: architecto

status   integer   

Status of the vehicle intake items contained in the vehicle items to be returned, should be 1 or 0. Example: 1

vehicle_id   string   

ID of the vehicle that contains the vehicle intake to be returned Example: animi

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."
}
 

Request      

GET api/work-orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/work-orders/get-my-work-orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/work-orders/get-history/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the get history. Example: quo

vehicle_id   string   

ID of the vehicle that contains the work orders Example: non

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/work-orders/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the work order. Example: 9afca40c-ea08-4f77-8a7c-0f08297211e3

work_order_id   string   

ID of the work order to be returned Example: eligendi

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."
}
 

Request      

GET api/work-orders/vehicle/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the vehicle. Example: 9af6d80b-3152-4f9f-958c-710df03406f0

vehicle_id   string   

ID of the vehicle that contains the work orders Example: quaerat

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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."
}
 

Request      

GET api/work-orders/vehicle-intake/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the vehicle intake. Example: 9afca3ce-6bd4-43b1-8154-fe9521d8ee21

vehicle_intake_id   string   

ID of the vehicle intake that contains the Work Orders Example: sunt

Query Parameters

offset   integer  optional  

Field to offset the records returned from the API request. Defaults to 0. Example: 10

limit   integer  optional  

Field to limit the records returned from the API request. Defaults to 10. Example: 20

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());

Request      

POST api/work-orders/store

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

vehicle_intake_id   string   

ID of the vehicle intake that contains the work order Example: omnis

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());

Request      

PUT api/work-orders/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: quasi

work_order_id   string   

ID of the work order to be updated Example: necessitatibus

Body Parameters

total_labour_cost   number   

Total labour cost for the work order. Example: 12000

status   string   

Status to be updated, should be initiated, in_progress, completed,on_hold, rework. Example: 12000.00

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());

Request      

PUT api/work-orders/change-status/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the change status. Example: dicta

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());

Request      

DELETE api/work-orders/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: tenetur

work_order_id   string   

ID of the work order to be deleted Example: ut

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."
}
 

Request      

GET api/work-orders/details/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the detail. Example: tempore

work_order_id   string  optional  

string. ID of the work order that contains the work order details Example: sed

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."
}
 

Request      

GET api/work-orders/details/show/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the show. Example: minus

work_order_detail_id   string  optional  

Id of the work order detail to be returned Example: temporibus

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());

Request      

POST api/work-orders/details/store/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the store. Example: adipisci

work_order_id   string  optional  

Id of the work order that contains the work order detail Example: et

Body Parameters

system_code   integer   

System code of the work order detail. Example: 8

work_accomplished_code   integer   

Work accomplished code of the work order detail. Example: 8

part_no_description   string  optional  

Must not be greater than 255 characters. Example: ozsxjsnyrumsfocjwzvrnh

quantity   integer   

The number of this work order detail used. Example: 8

unit_cost   integer  optional  

Cost for a single unit of the work order detail. Example: 8

part_failure_code   integer   

Part failure code of the work order detail. Example: 8

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());

Request      

PUT api/work-orders/details/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: quis

work_order_detail_id   string  optional  

Id of the work order detail to be updated Example: autem

Body Parameters

system_code   integer   

System code of the work order detail. Example: 8

work_accomplished_code   integer   

Work accomplished code of the work order detail. Example: 8

part_no_description   string  optional  

Must not be greater than 255 characters. Example: xovrdtjvk

quantity   integer   

The number of this work order detail used. Example: 8

unit_cost   integer  optional  

Cost for a single unit of the work order detail. Example: 8

part_failure_code   integer   

Part failure code of the work order detail. Example: 8

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());

Request      

DELETE api/work-orders/details/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: ipsa

work_order_detail_id   string  optional  

Id of the work order detail to be deleted Example: corrupti

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());

Request      

PUT api/work-orders/details/change-status/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the change status. Example: aperiam

work_order_id   string  optional  

The ID of the work order detail to be updated Example: sunt

Body Parameters

status   string   

Status to be updated, should be pending, in_progress or completed. Example: pending

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());

Request      

PUT api/work-orders/details/change-approval/{workOrderDetail_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

workOrderDetail_id   string   

The ID of the workOrderDetail. Example: 9afca44a-3ac4-4109-8350-43975d1779c0

work_order_id   string  optional  

The ID of the work order detail to be updated Example: qui

Body Parameters

status   The  optional  

status of the approval, should be either approved or declined Example: approved

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."
}
 

Request      

GET api/work-orders/lubrications/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the lubrication. Example: 9afca4cf-12ea-4c77-b719-33819375352c

work_order_id   string  optional  

ID of the work order Example: consectetur

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."
}
 

Request      

GET api/work-orders/lubrications/show/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the show. Example: eum

lubrication_id   string  optional  

Id of the lubrication Example: fuga

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());

Request      

POST api/work-orders/lubrications/store/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the store. Example: praesentium

work_order_id   string  optional  

Id of the work order that the lubrication will be added to. Example: quasi

Body Parameters

oil_type   string   

Oil type of the lubrication. Example: Engine Oil

measurement   string   

measurement of the lubrication. Example: litter

quantity   integer   

amount of the lubrication in measurement. Example: 0

unit   number   

cost of a single unit of measurement of the lubrication. Example: 0

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());

Request      

PUT api/work-orders/lubrications/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: in

lubrication_id   string  optional  

Id of the lubrication to be updated. Example: alias

Body Parameters

oil_type   string   

Oil type of the lubrication. Example: Engine Oil

measurement   string   

measurement of the lubrication. Example: litter

quantity   integer   

amount of the lubrication in measurement. Example: 0

unit   number   

cost of a single unit of measurement of the lubrication. Example: 0

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());

Request      

DELETE api/work-orders/lubrications/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: explicabo

lubrication_id   string  optional  

Id of the lubrication to be deleted. Example: repellendus

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());

Request      

PUT api/work-orders/lubrications/change-approval/{lubrication_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

lubrication_id   string   

The ID of the lubrication. Example: 9afca4cf-12ea-4c77-b719-33819375352c

lubrication   string  optional  

The ID of the lubrication to be updated Example: neque

Body Parameters

status   The  optional  

status of the approval, should be either approved or declined Example: approved

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."
}
 

Request      

GET api/work-orders/other-charges/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the other charge. Example: expedita

work_order_id   string  optional  

ID of the work order that contains the other charges Example: sint

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."
}
 

Request      

GET api/work-orders/other-charges/show/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the show. Example: fugit

other_charge_id   string  optional  

ID of the charge to be returned Example: ratione

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());

Request      

POST api/work-orders/other-charges/store/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the store. Example: explicabo

work_order_id   string  optional  

ID of the work order that contains the other charge Example: maxime

Body Parameters

price   number   

Price of the other charge. Example: 5000.75

description   string?  optional  

Description of the other charge. Example: 5000.75

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());

Request      

PUT api/work-orders/other-charges/update/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update. Example: illum

other_charge_id   string  optional  

ID of the charge to be updated Example: optio

Body Parameters

price   number   

Price of the other charge. Example: 5000.75

description   string?  optional  

Description of the other charge. Example: 5000.75

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());

Request      

DELETE api/work-orders/other-charges/delete/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the delete. Example: labore

other_charge_id   string  optional  

ID of the Charge to be deleted Example: quae

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());

Request      

PUT api/work-orders/other-charges/change-approval/{otherCharge_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

otherCharge_id   string   

The ID of the otherCharge. Example: praesentium

other_charges_id   string  optional  

The ID of the Other Charge to be updated Example: ad

Body Parameters

status   The  optional  

status of the approval, should be either approved or declined Example: approved