Veículos
Criar veículo
POST: /v1/vehicles
O objetivo dessa rota é cadastrar veículos.
method:'POST'
headers:{
'Accept':'application/json',
'Content-Type': 'application/json',
'Authorization' : 'Bearer <SEU_BEARER_TOKEN>'
}
body: {
"createVehicleInput": {
"year_model": "2020",
"year_make": "2019",
"plate": "BDK3G30",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"photo": null,
"make": "FIAT",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"chassis": "AJSNDALJDON"
}
}
Atributos
- year_model: (String) obrigatório
- Ano do modelo do veículo.
- year_make: (Boolean) obrigatório
- Se deseja fazer uma consulta essencial ou não. Default: false
- plate: (Boolean) obrigatório
- Placa do veículo sem caracteres especiais
- model: (Boolean) obrigatório
- Modelo do veículo
- photo: (File) opcional
- Uma foto do veículo
- make: (String) opcional
- Fabricante do veículo
- fuel: (String) opcional
- Combustíveis do veículo
- fipe_code: (String) opcional
- Código FIPE
- chassis: (String) opcional
- Chassi do veículo
Retorno 201
{
"content": {
"id": "d0adb585-120a-4393-a0ae-d7d63e7b979c",
"plate": "BDK3G25",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "AJSNDALJDON",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T21:30:48.490Z",
"updated_at": "2023-06-05T21:30:48.490Z",
"deleted": false
},
"message": "Vehicle retrieved successfully",
"error": null,
"statusCode": 201
}
Listar todas as consultas
GET: /v1/vehicles
O objetivo dessa rota é trazer todos os veículos já cadastrados
Retorno 200
{
"content": [
{
"id": "4999d62d-e358-4e44-89ff-0a9c4e39a852",
"plate": "BDK3G33",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "98822611BLKC77053",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T18:26:46.736Z",
"updated_at": "2023-06-05T18:26:46.736Z",
"deleted": false
},
{
"id": "6d21bb98-7e6f-4ad3-a901-09e2c804f123",
"plate": "BDK3G32",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "AJSNDALJDON",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T18:28:47.538Z",
"updated_at": "2023-06-05T18:28:47.538Z",
"deleted": false
},
{
"id": "822732d8-42e5-41eb-b25e-d14c5fb41149",
"plate": "BDK3G3",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "AJSNDALJDON",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T18:35:40.026Z",
"updated_at": "2023-06-05T18:35:40.026Z",
"deleted": false
},
{
"id": "0676ae85-0867-4f78-bf81-893039088d5b",
"plate": "BDK3G30",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "AJSNDALJDON",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T18:46:11.615Z",
"updated_at": "2023-06-05T18:46:11.615Z",
"deleted": false
}
],
"message": "Vehicles retrieved successfully",
"error": null,
"statusCode": 200
}
Encontrar consulta por ID
GET: /v1/vehicles/:ID
O objetivo dessa rota é trazer os dados de um veículo a partir do seu ID
Retorno 200
{
"content": {
"id": "6d21bb98-7e6f-4ad3-a901-09e2c804f123",
"plate": "BDK3G32",
"make": "FIAT",
"model": "FiatToro Freedom 1.8 16V Flex Aut.",
"fuel": "ALCOOL/GASOLINA",
"fipe_code": "001449-4",
"color": "-",
"chassis": "AJSNDALJDON",
"photo": null,
"year_make": "2019",
"year_model": "2020",
"company_id": "b7f00f3e-6cca-4f7b-8f8d-0024624bdfa2",
"created_at": "2023-06-05T18:28:47.538Z",
"updated_at": "2023-06-05T18:28:47.538Z",
"deleted": false
},
"message": "Vehicle retrieved successfully",
"error": null,
"statusCode": 200
}