DriveB

16. Car Workshop V2

Este módulo permite gerenciar oficinas favoritas, localizar oficinas próximas, consultar oficinas favoritas do Google Maps e recuperar informações relacionadas às oficinas disponíveis para atendimento.


Funcionalidades Principais

Abaixo estão os atalhos para as operações mais utilizadas neste módulo:


Adicionar oficina aos favoritos

Adicione uma oficina à lista de favoritos utilizando seu identificador.

Endpoint: /api/v2/car-workshops/{id}/add-favorite

Método: PUT

Request payload:

true

Response body:

{
"message": "string",
"payLoad": true,
"warning": true
}

Pesquisar oficinas próximas

Pesquise oficinas próximas com base na localização informada e em filtros como veículo, solicitação de serviço e favoritos.

Endpoint: /api/v2/car-workshops/nearby-workshops

Método: POST

Request payload:

{
"latitude": 0,
"longitude": 0,
"vehicleId": 0,
"tradingName": "string",
"serviceRequestId": 0,
"favoriteOnly": true,
"favoriteIds": [
0
]
}

Response body:

{
"totalElements": 0,
"totalPages": 0,
"size": 0,
"content": [
{
"id": 0,
"tradingName": "string",
"address": {
"id": null,
"district": null,
"street": null,
"number": null,
"city": null,
"state": null,
"country": null,
"countryCode": null,
"complement": null,
"zipCode": null,
"stateRegistration": null
},
"serviceCompletionDate": "2024-01-01T00:00:00Z",
"distance": 0,
"provideDesiredServices": true,
"acceptVehicleBrand": true,
"provideServiceType": true,
"latitude": 0,
"longitude": 0,
"networkName": "string",
"maintenancePrice": 0,
"email": "string",
"phone": "string",
"name": "string",
"favorite": true,
"selected": true,
"workshopGroupIds": [],
"conversations": [],
"negotiationId": 0,
"taxIdentifier": "string",
"corporateName": "string"
}
],
"number": 0,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"pageable": {
"offset": 0,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"pageNumber": 0,
"unpaged": true,
"paged": true,
"pageSize": 0
},
"numberOfElements": 0,
"first": true,
"last": true,
"empty": true
}

Pesquisar oficinas favoritas próximas

Recupere as oficinas favoritas próximas com base na localização informada e nos filtros fornecidos.

Endpoint: /api/v2/car-workshops/nearby-favorites

Método: POST

Request payload:

{
"latitude": 0,
"longitude": 0,
"vehicleId": 0,
"tradingName": "string",
"serviceRequestId": 0,
"favoriteOnly": true,
"favoriteIds": [
0
]
}

Response body:

[
{
"id": 0,
"tradingName": "string",
"address": {
"id": 0,
"district": "string",
"street": "string",
"number": "string",
"city": "string",
"state": "string",
"country": "string",
"countryCode": "string",
"complement": "string",
"zipCode": "string",
"stateRegistration": "string"
},
"serviceCompletionDate": "2024-01-01T00:00:00Z",
"distance": 0,
"provideDesiredServices": true,
"acceptVehicleBrand": true,
"provideServiceType": true,
"latitude": 0,
"longitude": 0,
"networkName": "string",
"maintenancePrice": 0,
"email": "string",
"phone": "string",
"name": "string",
"favorite": true,
"selected": true,
"workshopGroupIds": [
0
],
"conversations": [
{
"id": 0,
"active": true,
"status": "FINISHED",
"conversations": [],
"proposedDates": []
}
],
"negotiationId": 0,
"taxIdentifier": "string",
"corporateName": "string"
}
]

Consultar favoritos do Google Maps

Recupere a lista de oficinas favoritas cadastradas no Google Maps.

Endpoint: /api/v2/car-workshops/google-maps-favorites

Método: GET

Request payload:

true

Response body:

[
{
"id": 0,
"googleMapsId": "string",
"bcsAccountId": "string",
"name": "string",
"email": "string",
"phone": "string",
"latitude": 0,
"longitude": 0,
"isFavorite": true,
"favorite": true
}
]

Remover oficina dos favoritos

Remova uma oficina da lista de favoritos utilizando seu identificador.

Endpoint: /api/v2/car-workshops/{id}/remove-favorite

Método: DELETE

Request payload:

true

Response body:

{
"message": "string",
"payLoad": true,
"warning": true
}