Vehicles
Retrieve vehicles for a company
limit of records per page
10
page number
2
This parameter is used to filter by vehicle type.(Light-Duty Passenger Car, Light-Duty Passenger Truck,Electric Passenger Car,Heavy-Duty Truck (Semi),Specialty,Forklift,Trailer,Airplane,Recreational Vehicle,Excavator,Non-EPA Recognized Passenger Vehicle,Other)
Light-Duty Passenger Car
This field is used to filter by vehicle model. (LIKE)
Hay
This parameter is used to sort the records by a specific field (model,year,quantity,created_at,name_branch)
year
Order type(asc or desc)
asc
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/vehicles HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": [
{
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"company_id": "996501dd-e5a6-473f-9651-f0dc530df50d",
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"year": "2019",
"quantity": "6509",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
}
],
"meta": {
"pagination": {
"current": "1",
"last_page": "1",
"per_page": "10",
"total": "6"
}
}
}
Store a vehicle for a company
create vehicles request body data
type of the Vehicle
Heavy-Duty Truck (Semi)
model of the Vehicle
Mr. Rolando Hayes DDS
make of the Vehicle
est
quantity of the Vehicle
2019
year of the Vehicle
6509
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
POST /api/vehicles HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 109
{
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"quantity": "2019",
"year": 6509
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"company_id": "996501dd-e5a6-473f-9651-f0dc530df50d",
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"year": "2019",
"quantity": "6509",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
obtain information about a vehicle
Id of the vehicle
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
GET /api/vehicles/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"company_id": "996501dd-e5a6-473f-9651-f0dc530df50d",
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"year": "2019",
"quantity": "6509",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
updated vehicle
Id of the vehicle
996501df-0bfc-4f95-954d-3a5d5dc48469
updated vehicles request body data
type of the Vehicle
Heavy-Duty Truck (Semi)
model of the Vehicle
Mr. Rolando Hayes DDS
make of the Vehicle
est
quantity of the Vehicle
2019
year of the Vehicle
6509
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
PUT /api/vehicles/{id} HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 109
{
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"quantity": "2019",
"year": 6509
}
{
"status": "Ok",
"message": "Success",
"data": {
"id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
"company_id": "996501dd-e5a6-473f-9651-f0dc530df50d",
"type": "Heavy-Duty Truck (Semi)",
"model": "Mr. Rolando Hayes DDS",
"make": "est",
"year": "2019",
"quantity": "6509",
"updated_at": "2023-06-12T17:30:21.000000Z",
"created_at": "2023-06-12T17:30:21.000000Z"
},
"meta": {}
}
remove vehicle
Id of the vehicle
996501df-0bfc-4f95-954d-3a5d5dc48469
Successful operation
Bad Request
Unauthenticated
Not Found
Internal Server
DELETE /api/vehicles/{id} HTTP/1.1
Host: app.greenplaces.com
Accept: */*
{
"status": "Ok",
"message": "Success",
"data": null,
"meta": {}
}