09. AI Email
Este módulo permite gerar e enviar e-mails com auxílio de inteligência artificial, tanto para novos contatos com oficinas quanto para respostas de conversas já iniciadas.
Funcionalidades Principais
Abaixo estão os atalhos para as operações mais utilizadas neste módulo:
Gerar E-mail
Gera o conteúdo de um novo e-mail com auxílio de IA.
Endpoint: /api/ai-email/generate
Método: POST
Request payload:
{ "vehicleId": 0, "carWorkshopId": 0, "serviceTypes": [ { "id": 0, "nextServicePredictionId": 0, "key": "string", "displayValue": "string", "enabled": true, "mandatoryFields": "string", "timeToService": { "value": 0, "unit": "DAY" }, "nextServiceStatus": "SCHEDULED", "damageReports": [], "seasonalNeeds": [], "oemServices": [], "isSelected": true } ], "datesService": ["2026-01-01"], "timesService": ["2026-01-01T00:00:00"], "observations": "string", "emailType": "string"}Response body:
{ "subject": "string", "title": "string", "body": "string", "regards": "string"}Enviar E-mail
Envia o e-mail previamente gerado.
Endpoint: /api/ai-email/send
Método: POST
Request payload:
{ "subject": "string", "title": "string", "body": "string", "regards": "string", "vehicleId": 0, "carWorkshopId": 0, "serviceRequestId": 0, "serviceTypes": [ { "id": 0, "nextServicePredictionId": 0, "key": "string", "displayValue": "string", "enabled": true, "mandatoryFields": "string", "timeToService": { "value": 0, "unit": "DAY" }, "nextServiceStatus": "SCHEDULED", "damageReports": [], "seasonalNeeds": [], "oemServices": [], "isSelected": true } ], "datesService": ["2026-01-01"], "timesService": ["2026-01-01T00:00:00"], "observations": "string"}Response body:
{ "message": "string", "payLoad": { "serviceRequestId": 0, "carWorkshop": { "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": "2026-01-01T00:00:00", "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": [], "negotiationId": 0, "taxIdentifier": "string", "corporateName": "string" } }, "warning": true}Gerar Resposta de E-mail
Gera com IA a resposta para uma conversa já existente com a oficina.
Endpoint: /api/ai-email/generate-reply
Método: POST
Request payload:
{ "vehicleId": 0, "carWorkshopId": 0, "serviceRequestId": 0, "selectedOption": "string", "replyInput": "string"}Response body:
{ "subject": "string", "title": "string", "body": "string", "regards": "string"}Enviar Resposta de E-mail
Envia a resposta gerada para a oficina.
Endpoint: /api/ai-email/send-reply
Método: POST
Request payload:
{ "vehicleId": 0, "carWorkshopId": 0, "serviceRequestId": 0, "subject": "string", "title": "string", "body": "string", "regards": "string", "declined": true}Response body:
{ "message": "string", "payLoad": { "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": "2026-01-01T00:00:00", "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": [], "negotiationId": 0, "taxIdentifier": "string", "corporateName": "string" }, "warning": true}