10. Cobrança
Este módulo é responsável pela gestão financeira e fiscal das ordens de serviço realizadas na plataforma. Ele permite consultar informações de faturamento, acompanhar o processo de aprovação de notas fiscais e monitorar o status de gravação e validação das notas emitidas pelas oficinas credenciadas.
O módulo de Notas Fiscais permite a integração com os documentos fiscais gerados durante os processos de manutenção. Aqui você pode consultar, registrar e acompanhar notas fiscais eletrônicas associadas aos serviços realizados.
Funcionalidades Principais
Abaixo estão os atalhos para as operações mais utilizadas neste módulo:
Alterar status de gravação da nota fiscal
Atualiza o status de gravação da nota fiscal de uma solicitação de billing.
Endpoint: /api/billings/{requestId}/invoice/set-recorded-status
Método: PUT
Parâmetros:
requestId (path, obrigatório, string) — Billing entity identifier
Request payload:
trueResponse:
200 Approve invoice
403 Unauthorized
500 Unknown Server Error
Response body:
{ "message": "string", "payLoad": "string", "warning": true}Consultar entidade específica por Id
Retorna os dados completos de uma entidade de billing específica, incluindo valores de nota fiscal, status de processos e informações de orçamento (budget) vinculadas.
Endpoint: /api/billings/{id}
Método: GET
Parâmetros:
id (path, obrigatório, integer) — entity identifier
Response:
200 Return specific entity
403 Unauthorized
500 Unknown Server Error
Response body:
{ "id": 0, "approvalCode": 0, "licensePlate": "string", "clientCode": "string", "provider": "string", "providerCode": 0, "osServiceValue": 0, "osPartsValue": 0, "nf2": 0, "nf2SapLiquid": 0, "nf4": 0, "nf4SapLiquid": 0, "nfsTotal": 0, "nfsSapLiquid": 0, "purchaseOrderService": 0, "serviceNfNumber": 0, "partsNfNumber": 0, "serviceNfIssueDate": "2024-01-01T00:00:00Z", "serviceNfExpirationDate": "2024-01-01T00:00:00Z", "tesService": 0, "tesPart": 0, "statusProcessService": "string", "statusProcessPart": "string", "status": "string", "alCode": 0, "linkWo": "string", "billingCodCorrective": "string", "billingCodPreventive": "string", "billingMonth": "string", "debitNoteId": 0, "budgetId": 0, "requestId": "string", "partsNfIssueDate": "2024-01-01T00:00:00Z", "partsNfExpirationDate": "2024-01-01T00:00:00Z", "partsNfApprovalDate": "2024-01-01T00:00:00Z", "invoiceStatus": "string", "displayInvoiceStatus": "string", "serviceNfStatus": "string", "displayServiceNfStatus": "string", "partsNfStatus": "string", "displayPartsNfStatus": "string", "serviceNfPdfFilename": "string", "partsNfPdfFilename": "string", "partsNfXmlFilename": "string", "serviceNfPdfFilepath": "string", "partsNfPdfFilepath": "string", "partsNfXmlFilepath": "string", "invoiceNumber": "string", "invoiceIssueDate": "2024-01-01T00:00:00Z", "invoiceExpirationDate": "2024-01-01T00:00:00Z", "invoiceFilename": "string", "invoiceFilepath": "string", "tesInvoice": 0, "statusProcessInvoice": "string", "diplayStatusProcessInvoice": "string", "version": 0, "salesInvoicePartNumber": 0, "salesInvoicePartPdfFilepath": "string", "salesInvoicePartXmlFilepath": "string", "partsNfSendFileDate": "2024-01-01T00:00:00Z", "serviceNfSendFileDate": "2024-01-01T00:00:00Z", "invoiceSendFileDate": "2024-01-01T00:00:00Z", "isInvoicePartPdfReplaced": true, "isInvoicePartXmlReplaced": true, "isInvoiceServicePdfReplaced": true, "wasInvoiceRecorded": true, "serviceInvoiceStatus": "AVAILABLE", "partsInvoiceStatus": "AVAILABLE", "serviceInvoiceForCustomer": true, "budgetValues": { "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 } ] // ... (exemplo truncado) }}Todos os motivos de não aprovação de notas fiscais
Retorna todos os motivos possíveis para a não aprovação de notas fiscais.
Endpoint: /api/billings/reasons-not-approval-invoices
Método: GET
Response:
200 All the reasons for not approving invoices
403 Unauthorized
500 Unknown Server Error
Response body:
[ { "name": "string", "value": "string" }]Consultar fila de validação de notas fiscais
Retorna a fila de validação de notas fiscais, paginada e filtrável.
Endpoint: /api/billings/invoice-validation-queue
Método: GET
Parâmetros:
filters (query, obrigatório, -)
page (query, obrigatório, -)
Response:
200 Get invoice validation queue
403 Unauthorized
500 Unknown Server Error
Response body:
{ "totalElements": 0, "totalPages": 0, "size": 0, "content": [ { "id": 0, "billingId": 0, "serviceRequestId": 0, "requestId": "string", "clientId": 0, "clientName": "string", "vehicleLicensePlate": "string", "carWorkshopName": "string", "budgetId": 0, "carWorkshopPartsValue": 0, "carWorkshopServiceValue": 0, "invoiceStatus": "string", "partsNfStatus": "string", "partsNfNumber": 0, "partsNfIssueDate": "2024-01-01T00:00:00Z", "partsNfApprovalDate": "2024-01-01T00:00:00Z", "serviceNfStatus": "string", "blockCode": "string", "partsNfSendFileDate": "2024-01-01T00:00:00Z", "serviceNfSendFileDate": "2024-01-01T00:00:00Z", "invoiceSendFileDate": "2024-01-01T00:00:00Z", "isInvoiceRecorded": true, "isServiceInvoiceAvailable": "AVAILABLE", "isPartsInvoiceAvailable": "AVAILABLE", "wasInvoiceRecorded": true, "isInvoicePartPdfReplaced": true, "isInvoicePartXmlReplaced": true, "isInvoiceServicePdfReplaced": true, "clientPriceNfPart": 0, "approvalCode": "string", "provider": "string", "partsNfPdfFilename": "string", "partsNfXmlFilename": "string", "partsNfPdfFilepath": "string", "partsNfXmlFilepath": "string", "partsNfExpirationDate": "2024-01-01T00:00:00Z", "serviceInvoiceForCustomer": true, "isFee": true } ], "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}Consultar fila de validação de notas fiscais de peças e serviços
Retorna a fila de validação de notas fiscais de peças e serviços, paginada e filtrável.
Endpoint: /api/billings/invoice-parts-services-queue
Método: GET
Parâmetros:
filters (query, obrigatório, -)
page (query, obrigatório, -)
Response:
200 Get invoice validation queue of parts and services
403 Unauthorized
500 Unknown Server Error
Response body:
{ "totalElements": 0, "totalPages": 0, "size": 0, "content": [ { "billingId": 0, "serviceRequestId": 0, "requestId": "string", "clientId": 0, "clientName": "string", "clientType": "string", "clientCountryId": 0, "vehicleLicensePlate": "string", "invoiceStatus": "string", "partsNfStatus": "string", "serviceNfStatus": "string", "partsNfNumber": 0, "partsNfIssueDate": "2024-01-01T00:00:00Z", "serviceNfNumber": 0, "serviceNfIssueDate": "2024-01-01T00:00:00Z", "budgetId": 0, "carWorkshopId": 0, "carWorkshopName": "string", "blockCode": "string", "isInvoiceRecorded": true, "isInvoicePartPdfReplaced": true, "isInvoicePartXmlReplaced": true, "isInvoiceServicePdfReplaced": true, "status": "string", "wasInvoiceRecorded": true, "isServiceInvoiceAvailable": "AVAILABLE", "isPartsInvoiceAvailable": "AVAILABLE", "approvalCode": "string", "provider": "string", "clientPriceNfService": 0, "serviceNfExpirationDate": "2024-01-01T00:00:00Z", "partsNfExpirationDate": "2024-01-01T00:00:00Z", "serviceNfPdfFilename": "string", "partsNfPdfFilename": "string", "partsNfXmlFilename": "string", "serviceNfPdfFilepath": "string", "partsNfPdfFilepath": "string", "partsNfXmlFilepath": "string", "partsNfSendFileDate": "2024-01-01T00:00:00Z", "serviceNfSendFileDate": "2024-01-01T00:00:00Z", "osServiceValue": 0, "osPartsValue": 0, "serviceInvoiceForCustomer": true, "isFee": true, "createdAt": "2024-01-01T00:00:00Z" } ], "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}