13. Orçamento
Este módulo permite consultar, atualizar, aprovar e gerenciar orçamentos vinculados às solicitações de serviço, além de disponibilizar operações para gerenciamento de arquivos e exportação de informações.
Funcionalidades Principais
Abaixo estão os atalhos para as operações mais utilizadas neste módulo:
Consultar orçamento por ID
Recupere as informações completas de um orçamento, incluindo seus serviços, peças, validações e demais informações relacionadas.
Endpoint: /api/budgets/{id}
Método: GET
Request payload:
trueResponse body:
{ "id": 0, "serviceRequestId": 0, "billingId": 0, "status": "string", "displayStatus": "string", "approvalCode": 0, "creatorUser": "string", "perfil": "string", "createdAt": "2024-01-01T00:00:00Z", "modifiedAt": "2024-01-01T00:00:00Z", "clientApprovalAvailableAt": "2024-01-01T00:00:00Z", "modifiedBy": "string", "observationApproveOrCancel": "string", "observationRemoveVehicle": "string", "observationBackoffice": "string", "observationCarWorkshop": "string", "generatedCarWorkshop": true, "approvedDate": "2024-01-01T00:00:00Z", "budgetServiceItems": [ { "id": 0, "budgetId": 0, "serviceId": 0, "clientPrice": 0, "carWorkshopPrice": 0, "intermediationFee": 0, "admFee": 0, "driveBMargin": 0, "serviceName": "string", "serviceCode": "string", "amountOfHours": 0, "modifiedBy": "string", "isPreventiveVerification": true, "isPreventiveVerificationConfirmed": true, "courtesy": true, "guarantee": true, "savingPrice": 0, "recommendation": "string", "pctMarket": 0, "pctPlatform": 0 } ], "budgetPartItems": [ { "id": 0, "budgetId": 0, "partId": 0, "clientPrice": 0, "carWorkshopPrice": 0, "partAmount": 0, "intermediationFee": 0, "admFee": 0, "driveBMargin": 0, "partManufacturerName": "string", "partCode": "string", "partName": "string", "measurementUnit": "string", "budgetServiceItem": { "id": null, "budgetId": null, "serviceId": null, "clientPrice": null, "carWorkshopPrice": null, "intermediationFee": null, "admFee": null, "driveBMargin": null, "serviceName": null, "serviceCode": null, "amountOfHours": null, "modifiedBy": null, "isPreventiveVerification": null, "isPreventiveVerificationConfirmed": null, "courtesy": null, "guarantee": null, "savingPrice": null, "recommendation": null, "pctMarket": null, "pctPlatform": null }, "modifiedBy": "string", "isPreventiveVerification": true, "isPreventiveVerificationConfirmed": true, "pnErpCode": "string", "tire": true, "courtesy": true, "guarantee": true, "itaCode": "string", "savingPrice": 0, "recommendation": "string", "pctMarket": 0, "pctPlatform": 0, "isInternalReferenceBase": true } ], "budgetValidations": [ { "id": 0, "budgetId": 0, "status": "string", "observation": "string", "creatorUser": "string", "createdAt": "2024-01-01T00:00:00Z" } ], "carWorkshopPdfFilename": "string", "carWorkshopPdfFilepath": "string", "clientApproverProfile": "DRIVER", "clientApproverUsername": "string", "approvalLimitId": 0, "workflowClientApprovalsCount": 0, "workflowClientApprovalsTotal": 0, "workflowClientIsLastApprover": true, "workflowClientNextApprovalUserType": "APPROVAL_USER_1", "inRenegotiation": true, "version": 0, "hasChangedValue": true, "vehicleArrivalConfirmationDate": "2024-01-01T00:00:00Z", "servicesTotal": 0, "savingPrice": 0, "requiredApprovals": 0, "costCenter": "string", "updateRegionPrice": true, "saveBudgetValuesHistory": true, "admFeeTotal": 0, "empty": true}Atualizar orçamento
Atualize as informações de um orçamento existente utilizando seu identificador.
Endpoint: /api/budgets/{id}
Método: PUT
Request payload:
{ "id": 0, "serviceRequestId": 0, "billingId": 0, "status": "string", "displayStatus": "string", "approvalCode": 0, "creatorUser": "string", "perfil": "string", "createdAt": "2024-01-01T00:00:00Z", "modifiedAt": "2024-01-01T00:00:00Z", "clientApprovalAvailableAt": "2024-01-01T00:00:00Z", "modifiedBy": "string", "observationApproveOrCancel": "string", "observationRemoveVehicle": "string", "observationBackoffice": "string", "observationCarWorkshop": "string", "generatedCarWorkshop": true, "approvedDate": "2024-01-01T00:00:00Z", "budgetServiceItems": [ { "id": 0, "budgetId": 0, "serviceId": 0, "clientPrice": 0, "carWorkshopPrice": 0, "intermediationFee": 0, "admFee": 0, "driveBMargin": 0, "serviceName": "string", "serviceCode": "string", "amountOfHours": 0, "modifiedBy": "string", "isPreventiveVerification": true, "isPreventiveVerificationConfirmed": true, "courtesy": true, "guarantee": true, "savingPrice": 0, "recommendation": "string", "pctMarket": 0, "pctPlatform": 0 } ], "budgetPartItems": [ { "id": 0, "budgetId": 0, "partId": 0, "clientPrice": 0, "carWorkshopPrice": 0, "partAmount": 0, "intermediationFee": 0, "admFee": 0, "driveBMargin": 0, "partManufacturerName": "string", "partCode": "string", "partName": "string", "measurementUnit": "string", "budgetServiceItem": { "id": null, "budgetId": null, "serviceId": null, "clientPrice": null, "carWorkshopPrice": null, "intermediationFee": null, "admFee": null, "driveBMargin": null, "serviceName": null, "serviceCode": null, "amountOfHours": null, "modifiedBy": null, "isPreventiveVerification": null, "isPreventiveVerificationConfirmed": null, "courtesy": null, "guarantee": null, "savingPrice": null, "recommendation": null, "pctMarket": null, "pctPlatform": null }, "modifiedBy": "string", "isPreventiveVerification": true, "isPreventiveVerificationConfirmed": true, "pnErpCode": "string", "tire": true, "courtesy": true, "guarantee": true, "itaCode": "string", "savingPrice": 0, "recommendation": "string", "pctMarket": 0, "pctPlatform": 0, "isInternalReferenceBase": true } ], "budgetValidations": [ { "id": 0, "budgetId": 0, "status": "string", "observation": "string", "creatorUser": "string", "createdAt": "2024-01-01T00:00:00Z" } ], "carWorkshopPdfFilename": "string", "carWorkshopPdfFilepath": "string", "clientApproverProfile": "DRIVER", "clientApproverUsername": "string", "approvalLimitId": 0, "workflowClientApprovalsCount": 0, "workflowClientApprovalsTotal": 0, "workflowClientIsLastApprover": true, "workflowClientNextApprovalUserType": "APPROVAL_USER_1", "inRenegotiation": true, "version": 0, "hasChangedValue": true, "vehicleArrivalConfirmationDate": "2024-01-01T00:00:00Z", "servicesTotal": 0, "savingPrice": 0, "requiredApprovals": 0, "costCenter": "string", "updateRegionPrice": true, "saveBudgetValuesHistory": true, "admFeeTotal": 0, "empty": true}Response body:
{ "message": "string", "payLoad": { "id": 0, "serviceRequestId": 0, "billingId": 0, "status": "string", "displayStatus": "string", "approvalCode": 0, "creatorUser": "string", "perfil": "string", "createdAt": "2024-01-01T00:00:00Z", "modifiedAt": "2024-01-01T00:00:00Z", "clientApprovalAvailableAt": "2024-01-01T00:00:00Z", "modifiedBy": "string", "observationApproveOrCancel": "string", "observationRemoveVehicle": "string", "observationBackoffice": "string", "observationCarWorkshop": "string", "generatedCarWorkshop": true, "approvedDate": "2024-01-01T00:00:00Z", "budgetServiceItems": [ { "id": null, "budgetId": null, "serviceId": null, "clientPrice": null, "carWorkshopPrice": null, "intermediationFee": null, "admFee": null, "driveBMargin": null, "serviceName": null, "serviceCode": null, "amountOfHours": null, "modifiedBy": null, "isPreventiveVerification": null, "isPreventiveVerificationConfirmed": null, "courtesy": null, "guarantee": null, "savingPrice": null, "recommendation": null, "pctMarket": null, "pctPlatform": null } ], "budgetPartItems": [ { "id": null, "budgetId": null, "partId": null, "clientPrice": null, "carWorkshopPrice": null, "partAmount": null, "intermediationFee": null, "admFee": null, "driveBMargin": null, "partManufacturerName": null, "partCode": null, "partName": null, "measurementUnit": null, "budgetServiceItem": null, "modifiedBy": null, "isPreventiveVerification": null, "isPreventiveVerificationConfirmed": null, "pnErpCode": null, "tire": null, "courtesy": null, "guarantee": null, "itaCode": null, "savingPrice": null, "recommendation": null, "pctMarket": null, "pctPlatform": null, "isInternalReferenceBase": null } ], "budgetValidations": [ { "id": null, "budgetId": null, "status": null, "observation": null, "creatorUser": null, "createdAt": null } ], "carWorkshopPdfFilename": "string", "carWorkshopPdfFilepath": "string", "clientApproverProfile": "DRIVER", "clientApproverUsername": "string", "approvalLimitId": 0, "workflowClientApprovalsCount": 0, "workflowClientApprovalsTotal": 0, "workflowClientIsLastApprover": true, "workflowClientNextApprovalUserType": "APPROVAL_USER_1", "inRenegotiation": true, "version": 0, "hasChangedValue": true, "vehicleArrivalConfirmationDate": "2024-01-01T00:00:00Z", "servicesTotal": 0, "savingPrice": 0, "requiredApprovals": 0, "costCenter": "string", "updateRegionPrice": true, "saveBudgetValuesHistory": true, "admFeeTotal": 0, "empty": true }}Atualizar orçamento do intermediário
Atualize as informações de um orçamento por meio do fluxo de intermediação.
Endpoint: /api/budgets/{id}/intermediary
Método: PUT
Request payload: (mesmo formato de "Atualizar orçamento")
Response body: (mesmo formato de "Atualizar orçamento", com o campo adicional "warning": true)
Atualizar justificativa de aprovação
Atualize a justificativa associada à aprovação de um orçamento.
Endpoint: /api/budgets/{id}/approved-justification
Método: PUT
Request payload: (mesmo formato de "Atualizar orçamento")
Response body: (mesmo formato de "Atualizar orçamento", com o campo adicional "warning": true)
Aprovar orçamento
Aprove um orçamento, permitindo informar serviços ou peças removidos, código de aprovação, observações e centro de custo.
Endpoint: /api/budgets/{id}/approve
Método: PUT
Request payload:
{ "id": 0, "removedPartsIds": [ 0 ], "removedServicesIds": [ 0 ], "approvalCode": "string", "observations": "string", "vehicleInCarWorkshop": true, "costCenter": "string"}Response body: (mesmo formato de "Atualizar orçamento", com o campo adicional "warning": true)
Listar arquivos do orçamento
Recupere todos os arquivos vinculados a um orçamento.
Endpoint: /api/budgets/{id}/files
Método: GET
Request payload:
trueResponse body:
[ { "budgetId": 0, "blobFileId": 0, "name": "string", "description": "string", "blobCategory": "CATEGORY_VEHICLE_ATTENDANCE_EVIDENCE" }]Adicionar arquivo ao orçamento
Adicione um novo arquivo ao orçamento informando seus metadados.
Endpoint: /api/budgets/{id}/files
Método: POST
Response body:
{ "budgetId": 0, "blobFileId": 0, "name": "string", "description": "string", "blobCategory": "CATEGORY_VEHICLE_ATTENDANCE_EVIDENCE"}Exportar orçamento
Exporte um orçamento para um arquivo.
Endpoint: /api/budgets/{id}/export
Método: POST
Request payload:
trueListar categorias de arquivos
Recupere todas as categorias de arquivos disponíveis para utilização nos orçamentos.
Endpoint: /api/budgets/blob-categories
Método: GET
Request payload:
trueResponse body:
[ "CATEGORY_VEHICLE_ATTENDANCE_EVIDENCE"]