Vehicles
API calls for vehicles
Create vehicle
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:18080/api/v1/vehicles" \ -H "Content-Type: application/json" \ -d '{ "brand": "string", "color": "string", "fuelType": "PETROL", "licensePlate": "string", "mileage": 0, "mileageUnit": "KM", "model": "string", "type": "CAR", "year": 0 }'{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Delete by list of ids in current tenant
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X DELETE "http://localhost:18080/api/v1/vehicles" \ -H "Content-Type: application/json" \ -d '[ "string" ]'{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find by list of ids in current tenant
In: header
Query Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/vehicles/find?ids=string"[
{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}
]{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find all for current tenant
In: header
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/vehicles/find-all"[
{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}
]{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find by id in current tenant
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/vehicles/find/string"{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Get page by page number and size with optional sorting based on field to sortBy and direction
In: header
Query Parameters
int32int32"ASC" | "DESC"Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/vehicles/page"{
"content": [
{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}
],
"empty": true,
"first": true,
"last": true,
"number": 0,
"numberOfElements": 0,
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 0,
"paged": true,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"unpaged": true
},
"size": 0,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"totalElements": 0,
"totalPages": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Delete by id in current tenant
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X DELETE "http://localhost:18080/api/v1/vehicles/string"{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Update vehicle
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "http://localhost:18080/api/v1/vehicles/string" \ -H "Content-Type: application/json" \ -d '{ "brand": "string", "color": "string", "fuelType": "PETROL", "licensePlate": "string", "mileage": 0, "mileageUnit": "KM", "model": "string", "type": "CAR", "year": 0 }'{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Add refueling to vehicle
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:18080/api/v1/vehicles/string/refueling" \ -H "Content-Type: application/json" \ -d '{ "amount": 0.1, "date": "2019-08-24T14:15:22Z", "mileage": 0.1, "price": 0.1 }'{
"averageFuelConsumption": 0.1,
"brand": "string",
"capacity": {
"height": 0.1,
"length": 0.1,
"seats": 0,
"weight": 0.1,
"width": 0.1
},
"color": "string",
"costOverDistanceDriven": 0.1,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"currencyUnit": "string",
"fuelHistory": [
{
"amount": 0.1,
"date": "2019-08-24T14:15:22Z",
"fuelConsumption": 0.1,
"id": "string",
"mileage": 0.1,
"price": 0.1,
"user": "string"
}
],
"fuelType": "PETROL",
"id": "string",
"licensePlate": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
},
"locationHistory": [
{
"date": "2019-08-24T14:15:22Z",
"id": "string",
"location": {
"address": {
"city": "string",
"country": "string",
"houseNumber": "string",
"id": "string",
"latitude": 0.1,
"longitude": 0.1,
"postalCode": "string",
"street": "string"
},
"coordinate": {
"latitude": -90,
"longitude": -180
},
"name": "string"
}
}
],
"mileage": 0,
"mileageUnit": "KM",
"model": "string",
"tenantId": "string",
"type": "CAR",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"vin": "string",
"year": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}