{
  "openapi": "3.0.1",
  "info": {
    "title": "Spedy API",
    "description": "# Introdução\n\n**Bem-vindo a documentação de referência da API Spedy!**\n\nDisponibilizamos uma API no modelo REST para que você possa emitir notas fiscais de produto (NF-e) ou serviço (NFS-e) em todo o Brasil.\n\nPara emissão de NFS-e, consulte os [municípios integrados](https://app.spedy.com.br/integrated-cities).\n\nO endereço base do ambiente de produção é <code>api.spedy.com.br</code> acompanhado sempre do protocolo seguro https:// como prefixo. As versões da API são agrupadas por diretório, sufixadas ao endereço base (_https://api.spedy.com.br/v1_).\n\n## Integração com IA\n\nSe você está usando um assistente de IA (GitHub Copilot, Cursor, Claude, ChatGPT etc.) para integrar com a API Spedy, disponibilizamos um arquivo `llms.txt` com toda a documentação em formato otimizado para modelos de linguagem — sem HTML, sem overhead de UI.\n\nO arquivo contém todos os endpoints, parâmetros, exemplos de request/response, enums com descrições e fluxos de integração em texto puro.\n\n**Disponível em:** [https://api.spedy.com.br/llms.txt](https://api.spedy.com.br/llms.txt)\n\nCole o conteúdo no contexto da conversa com seu assistente, ou aponte a URL diretamente se a ferramenta suportar.\n\n# Ambiente de testes\n\nA Spedy também oferece um ambiente de testes, que é completamente isolado do ambiente de produção, portanto é necessário criar uma nova conta para utilizá-lo, escolhendo o <u>Plano Desenvolvedor</u> (sem custo). \n\nAs URLs do ambiente de teste estão listadas abaixo:\n\nAPI: https://sandbox-api.spedy.com.br/v1  \nBackoffice: https://sandbox-app.spedy.com.br  \n\n# Exemplos de requisição\n\nDisponibilizamos exemplos de requisição em uma Collection do Insominia.\n\nPara baixá-la, clique no botão abaixo\n\n[![Run in Insomnia](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=Spedy%20API&uri=https%3A%2F%2Fdocs.spedy.com.br%2FInsomnia_2022-03-04.json)\n\n\n# Autenticação\n\nA autenticação na API é realizada por meio de **Chave de API (API Key)**, que deve ser enviada no header `X-Api-Key` em todas as requisições.\n\n## Obtendo a Chave de API\n\n### Na criação da empresa (via API)\n\nA chave de API é retornada **exclusivamente** no momento da criação de uma nova empresa, no campo `apiCredentials` da resposta. **Essa é a única vez em que a chave será exibida por completo** — armazene-a em local seguro.\n\nExemplo de resposta (campos resumidos):\n\n```json\n{\n  \"result\": {\n    \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n    \"name\": \"Minha Empresa LTDA\",\n    \"federalTaxNumber\": \"12345678000199\",\n    \"apiCredentials\": {\n      \"apiKey\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n    }\n  }\n}\n```\n\n> **Importante:** em consultas posteriores (`GET /v1/companies/{id}`), a chave será retornada ofuscada (ex: `a1b2****-****-****-****-************`).\n\n### Pelo Backoffice\n\nCaso não tenha salvo a chave no momento da criação, você pode:\n\n1. **Visualizar a chave atual** — acesse **Perfil > Minha empresa > Credenciais da API**\n2. **Gerar uma nova chave** — na mesma tela, clique em **Gerar nova chave**. A chave anterior será revogada imediatamente e deixará de funcionar.\n\n## Escopo da Chave\n\nCada empresa cadastrada possui sua própria Chave de API. O escopo de permissões depende do tipo de empresa:\n\n| Tipo | Permissões |\n|---|---|\n| **Empresa principal** (primeira da conta) | Gerenciar empresas (criar, editar, excluir) + operações de nota fiscal |\n| **Demais empresas** | Apenas operações relacionadas a nota fiscal |\n\n## Exemplo de uso\n\n```bash\ncurl -X GET https://api.spedy.com.br/v1/service-invoices \\\n  -H \"X-Api-Key: a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n```\n\n# Rate Limit\n\nPara garantir a **estabilidade**, **desempenho** e **segurança** dos nossos serviços, a API impõe limites ao número de requisições que podem ser realizadas por usuário ou aplicação em um determinado intervalo de tempo.\n\n#### **Limites padrão**\n- **60 requisições por minuto**\n- **Máximo de 5 requisições por segundo**\n- Aplica-se a todas as operações (leitura e escrita)\n\nSe o cliente exceder esses limites, a API responderá com o **status HTTP 429 (Too Many Requests)**. Neste caso, recomendamos aguardar o tempo indicado no cabeçalho `x-rate-limit-reset` antes de tentar novamente. \n\n#### **Cabeçalhos de Rate Limit**\nA cada requisição, a API retorna os seguintes cabeçalhos:\n\n| Cabeçalho                | Descrição                                                                 |\n|--------------------------|---------------------------------------------------------------------------|\n| `x-rate-limit-limit`     | Janela de tempo usada no controle de limite (ex: `1m` para 1 minuto)      |\n| `x-rate-limit-remaining` | Número de requisições restantes antes de atingir o limite                 |\n| `x-rate-limit-reset`     | Data/hora (em UTC) em que o limite será reiniciado                        |\n\n# Fluxo de emissão\n\nA emissão de notas fiscais na Spedy é **assíncrona**: ao receber a requisição, a Spedy valida os dados, **enfileira** a nota para processamento e responde imediatamente com a nota no status `enqueued`. O envio à Prefeitura/SEFAZ e a autorização acontecem em segundo plano — acompanhe o resultado por **webhook** (recomendado) ou consultando a nota pelo endpoint de leitura.\n\n## Formas de emissão\n\nHá duas formas de emitir uma nota, escolhidas conforme o quanto de dado tributário você quer enviar:\n\n| Forma | Endpoint | Quando usar |\n|---|---|---|\n| **Por venda** | `POST /v1/orders` | Forma mais simples: você envia apenas os dados da venda (data, cliente, itens e valor total) e a Spedy resolve a tributação a partir da configuração da empresa. Não é necessário enviar nenhuma informação tributária (códigos, impostos, retenções etc.). Atende cenários mais simples de emissão. |\n| **Nota completa** | `POST /v1/service-invoices` (NFS-e), `POST /v1/product-invoices` (NF-e), `POST /v1/consumer-invoices` (NFC-e) | Você envia os dados tributários completos, conforme o modelo da nota. Indicada para cenários mais complexos ou quando o cliente final não deve acessar o backoffice da Spedy para configurar nada. |\n\nEm ambas as formas a nota entra no mesmo fluxo de processamento assíncrono descrito a seguir.\n\n## Etapas do processamento\n\n| # | Etapa | O que acontece |\n|---|---|---|\n| 1 | **Recebimento** | Você envia a requisição (`/orders` ou `/{modelo}-invoices`). A Spedy valida o payload e cria a nota com status `enqueued`. |\n| 2 | **Enfileiramento** | A emissão é colocada na fila de processamento. |\n| 3 | **Envio à autoridade** | A Spedy transmite a nota à Prefeitura/SEFAZ. |\n| 4 | **Processamento fiscal** | A autoridade processa a nota. |\n| 5 | **Atualização de status** | A Spedy consulta o resultado e atualiza `status` e `processingDetail` da nota (ex.: `authorized`, `rejected`). |\n| 6 | **Notificação** | Havendo webhook configurado, a Spedy notifica o seu sistema com o resultado. |\n\n> **Emissão por venda (`/orders`):** na integração por venda, o enfileiramento da Etapa 1 depende do atributo `autoIssueMode`. A nota só é enfileirada quando o modo permite a emissão: `immediately` (ao criar a venda), `afterPayment` (quando a venda muda para `approved`) ou `afterWarrency` (no dia seguinte ao fim da garantia). Com `disabled`, a venda é registrada mas nenhuma nota é emitida automaticamente.\n\nA autorização depende da disponibilidade e do tempo de processamento da Prefeitura/SEFAZ, que varia conforme a autoridade — mas, em geral, uma nota é autorizada em **menos de 10 segundos** após o envio.\n\n**Acompanhando o resultado:** recomendamos fortemente o uso de **Webhooks** para receber as atualizações de status automaticamente. Se não utilizar webhooks, faça *polling* consultando a nota pelo endpoint de leitura (`GET /v1/{modelo}-invoices/{id}`), que retorna o `status` atual sem acionar a autoridade fiscal.\n\n## Preenchimento de Cidades\n\nTodos os campos de cidade na API (`city` em endereços de receiver, company etc.) aceitam duas formas de preenchimento:\n\n**Por código IBGE (recomendado quando disponível):**\n\n```json\n{ \"city\": { \"code\": \"3550308\" } }\n```\n\nMais assertivo: não depende de matching no nome. Use quando o código IBGE estiver disponível no sistema de origem.\n\n**Por nome e estado:**\n\n```json\n{ \"city\": { \"name\": \"São Paulo\", \"state\": \"SP\" } }\n```\n\nAlternativa quando o código IBGE não está disponível. A Spedy resolve automaticamente o município pelo nome e estado.\n\nNão é necessário enviar os três campos juntos — basta código IBGE **ou** nome + estado.\n\n## Status e Detalhes do Processamento\n\nToda nota fiscal retornada pela API possui dois campos importantes para acompanhar o resultado das operações:\n\n**`status`** — representa o estado atual da nota fiscal. É controlado exclusivamente pela Spedy e **não deve ser enviado** nas requisições de emissão. Use-o para saber se a nota foi autorizada, rejeitada, cancelada etc.\n\n**`processingDetail`** — contém o resultado do **último processamento** executado na nota (emissão, cancelamento, carta de correção etc.). É atualizado a cada operação. Seus campos são:\n\n| Campo | Descrição |\n|---|---|\n| `status` | `success`, `processing` ou `failed` |\n| `message` | Mensagem descritiva do resultado |\n| `code` | Código retornado pela autoridade fiscal |\n\nQuando uma nota é rejeitada (`status: \"rejected\"`), os detalhes da rejeição ficam em `processingDetail.message` e `processingDetail.code`. Rejeições podem vir diretamente da SEFAZ/Prefeitura ou da validação prévia da Spedy — que utiliza o schema fornecido pela autoridade fiscal para validar os dados antes do envio. Quando a rejeição é da Spedy, o código em `processingDetail.code` inicia com o prefixo `SPD`. Em ambos os casos, o formato é idêntico.\n\n> **Nota sobre `processingDetail.status`:** O valor `success` indica que o processamento assíncrono foi executado — **não** que a nota foi autorizada. Uma nota rejeitada terá `processingDetail.status: \"success\"` porque o evento na fila foi processado corretamente. O valor `failed` ocorre apenas em falhas internas de infraestrutura, independentemente do resultado fiscal.\n\n# Webhooks\n\nA Spedy envia um HTTP POST para a URL configurada sempre que um evento ocorrer nas notas fiscais da sua conta. **O webhook é configurado por conta, não por empresa** — uma única configuração recebe eventos de todas as empresas da conta. Para identificar qual empresa gerou o evento, utilize o objeto `company` presente no payload.\n\n## Eventos disponíveis\n\n| Evento | Descrição |\n| --- | --- |\n| `invoice.status_changed` | Qualquer alteração de status da nota (criação, autorização, rejeição, cancelamento etc.) |\n| `invoice.authorized` | Nota fiscal autorizada |\n| `invoice.rejected` | Nota fiscal rejeitada |\n| `invoice.canceled` | Nota fiscal cancelada |\n\n> **Dica:** O evento `invoice.status_changed` cobre todo o ciclo de vida da nota. Na maioria dos casos, assinar apenas este evento é suficiente.\n\n## Política de Retry\n\nQuando a entrega de um webhook falha (endpoint indisponível, timeout, HTTP 5xx), o sistema executa até **5 retentativas** com intervalos crescentes:\n\n| Tentativa | Intervalo |\n| --- | --- |\n| 1ª | 5 minutos |\n| 2ª | 30 minutos |\n| 3ª | 1 hora |\n| 4ª | 4 horas |\n| 5ª | 16 horas |\n\nApós 5 falhas consecutivas, o webhook é **desabilitado automaticamente**. Para reativá-lo, utilize o endpoint `PUT /v1/webhooks/{id}/enable`. Eventos perdidos durante o período desabilitado não são reenviados — utilize os endpoints de consulta (`GET /v1/service-invoices`, `GET /v1/product-invoices`) para reconciliar.\n\n## Schema do payload\n\nTodos os eventos seguem a mesma estrutura:\n\n```json\n{\n    \"id\": \"uuid-do-evento\",\n    \"event\": \"invoice.status_changed\",\n    \"data\": { ... }\n}\n```\n\n| Campo | Descrição |\n| --- | --- |\n| `id` | Identificador único do evento |\n| `event` | Tipo do evento |\n| `data` | Dados completos do objeto que gerou o evento |\n\n## Exemplo de payload\n\nO exemplo abaixo é de uma autorização de NFS-e. O campo `data` contém os mesmos dados retornados pelo `GET /v1/service-invoices/{id}` — a estrutura é idêntica para NF-e, usando os campos do `GET /v1/product-invoices/{id}`.\n\n```\n{\n    \"id\": \"caaf34ab-6c65-4ca6-b6bf-b2d8f497c721\",\n    \"event\": \"invoice.status_changed\",\n    \"data\": {\n      \"id\": \"833e8e0e-3bda-4394-ab70-5edf4ee70988\",\n      \"status\": \"authorized\",\n\t  \"rps\": {\n        \"number\": 1,\n        \"series\": \"1\"\n      },\n      \"batchNumber\": 1,      \n      \"model\": \"serviceInvoice\",\n      \"environmentType\": \"production\",\n      \"issuedOn\": \"2021-11-08T18:35:37.823708\",\n      \"receiver\": {\n        \"name\": \"EMPRESA LTDA\",\n        \"federalTaxNumber\": \"00000571000189\",\n        \"municipalTaxNumber\": null,\n        \"email\": null,\n        \"phoneNumber\": null,\n        \"address\": {\n          \"street\": \"Estrada da Água Branca\",\n          \"district\": \"Padre Miguel\",\n          \"postalCode\": \"21720162\",\n          \"number\": \"3795\",\n          \"additionalInformation\": null,\n          \"city\": {\n\t\t\t\"name\": \"Rio de Janeiro\",\n\t\t\t\"state\": \"RJ\"\n\t\t  }\n        }\n      },\n      \"company\": {\n        \"name\": \"EMPRESA LTDA\",\n        \"legalName\": \"EMPRESA LTDA\",\n        \"federalTaxNumber\": \"00000571000189\",\n        \"stateTaxNumber\": \"634992136797\",\n        \"cityTaxNumber\": \"123456\"\n      },\n      \"order\": {\n        \"id\": \"fa15d7af-991d-467d-961a-f564b76d771c\",\n        \"date\": \"2021-10-14T09:00:00\",\n        \"transactionId\": \"AACcacAD1DB\"\n      },\n      \"authorization\": {\n\t\t\"date\": \"2021-11-08T18:35:38.443559\",\n\t\t\"protocol\": \"AAAB1245\",\n\t\t\"digestValue\": null\n\t  },\n      \"amount\": 100,\n      \"number\": 0,\n      \"processingDetail\": {\n        \"status\": \"success\",\n        \"message\": \"NFS-e autorizada pelo município.\",\n        \"code\": null,\n        \"on\": \"2021-11-08T18:35:38.443559\"\n      },\n      \"totals\": {\n        \"invoiceAmount\": 100,\n        \"netAmount\": 100,\n        \"issBaseTax\": 0,\n        \"irRate\": 0,\n        \"csllRate\": 0,\n        \"pisRate\": 0,\n        \"cofinsRate\": 0,\n        \"inssRate\": 0,\n        \"issRate\": 0,\n        \"issAmount\": 0,\n        \"discountUnconditionedAmount\": null,\n        \"discountConditionedAmount\": null,\n        \"irAmount\": 0,\n        \"pisAmount\": 0,\n        \"cofinsAmount\": 0,\n        \"inssAmount\": 0,\n        \"csllAmount\": 0,\n        \"othersAmount\": null,\n        \"deductionsAmount\": null,\n        \"irWithheld\": false,\n        \"issWithheld\": false,\n        \"cofinsWithheld\": false,\n        \"inssWithheld\": false,\n        \"csllWithheld\": false,\n        \"pisWithheld\": false\n      }      \n    }\n  }\n\n```\n\nOs demais eventos de nota fiscal possuem exatamente a mesma estrutura.\n\n# Reforma Tributária \n\nA partir de **1º de janeiro de 2026**, entra em vigor uma nova etapa da **Reforma Tributária**, marcada pela ampliação do uso da **NFS-e Nacional** — o modelo unificado do Governo Federal para emissão de Notas Fiscais de Serviço — e pela introdução dos novos tributos **IBS** e **CBS**, aplicáveis tanto às **notas de serviço (NFS-e)** quanto às **notas de produto (NF-e)**.\n\nNa **Spedy**, acompanhamos essa evolução desde as primeiras definições oficiais. Nossa plataforma está sendo continuamente preparada para suportar todas as adequações exigidas pela Reforma, garantindo que nossos clientes estejam em conformidade com as novas regras **desde o primeiro dia de vigência**.\n\n\n## Nota Fiscal de Serviço (NFS-e)\n\nPor se tratar de uma mudança **estrutural em nível nacional**, é importante considerar alguns cenários que podem ocorrer, especialmente neste **período inicial de 2026**, de transição entre modelos municipais e o ambiente nacional.\n\n### Municípios que já aderiram ao Emissor Nacional\n\nPara municípios que **já aderiram ao Emissor Nacional da NFS-e**, o processo de adequação é simples.\n\nBasta **atualizar o método de emissão** no sistema da Spedy para utilizar o **Ambiente Nacional**.\n\n- A lista completa e atualizada dos municípios aderentes pode ser consultada [aqui](https://www.gov.br/nfse/pt-br/municipios/monitoramento-adesoes/municipiosaderentes20251221.xlsx).\n- Esse ajuste pode ser realizado diretamente pelo **Backoffice**, conforme detalhado [neste artigo](https://ajuda.spedy.com.br/pt-br/article/entenda-como-atualizar-as-configuracoes-de-emissao-de-nfs-e-para-a-reforma-tributaria-2026-1rh3lbp/) da nossa Central de Ajuda:  \n  \n\nCaso você utilize a API de configurações, utilize o endpoint **[Alterar configurações](#tag/Empresas/paths/~1v1~1companies/post)** da empresa e altere o campo **IssueType** para o valor `annfs` (Ambiente Nacional).\n\n#### Alterações no RPS (DPS)\n\nAo emitir NFS-e no **Ambiente Nacional**, o **RPS passa a ser tratado como DPS (Declaração de Prestação de Serviços)**.\n\nIsso significa que:\n- A numeração e série configuradas deixam de representar o próximo RPS;\n- Passam a representar o **próximo número e série do DPS**.\n\nEssa alteração é fundamental para evitar rejeições no momento da emissão. \n\n\n### Novos campos do Layout Nacional\n\nO layout nacional da NFS-e introduz **novos campos obrigatórios**, que devem ser informados na emissão:\n\n#### Campos gerais\n\n- **Código NBS (`nbsCode`)** \n- **CST PIS/COFINS (`cstPisCofins`)**\n\n#### Campos de Comércio Exterior (`foreignTrade`)\n- **Modo de prestação** *\n- **Vínculo entre as partes** (Padrão: *Sem vínculo com o tomador*)\n- **Fomento utilizado pelo prestador do serviço** (Padrão: *Nenhum*)\n- **Fomento utilizado pelo tomador do serviço** (Padrão: *Nenhum*)\n- **Vínculo da operação à movimentação temporária de bens** (Padrão: *Nenhum*)\n- **Enviar NFS-e ao MDIC** (Padrão: *Não*)\n- **Valor do serviço em moeda estrangeira** *\n- **Código da moeda estrangeira** * (Padrão ISO, ex: `USD`, `BRL`)\n\n\\* Campos obrigatórios quando aplicáveis.\n\n\n\n### Municípios que ainda não aderiram ao Emissor Nacional\n\nPara municípios que ainda utilizam **sistemas próprios**, existem dois cenários possíveis:\n\n#### 1) Prefeituras que já se adaptaram ao novo modelo\n\nAlgumas prefeituras já disponibilizaram **ambientes de teste compatíveis com o novo modelo**, incluindo IBS e CBS.\n\nNesses casos, a Spedy está ajustando as integrações conforme os municípios disponibilizam os novos ambientes.\n\n#### 2) Prefeituras sem informações técnicas ou ambiente de homologação\n\nPara municípios que ainda não divulgaram informações técnicas ou ambientes de homologação, a Spedy segue monitorando os comunicados oficiais.\n\nAssim que os dados forem disponibilizados, a integração será iniciada imediatamente.\n\n\n### Novos impostos: IBS e CBS\n\nAlém das mudanças no layout da NFS-e, a Reforma Tributária altera de forma significativa a **estrutura de tributação sobre o consumo**, introduzindo o conceito de **IVA Dual**, composto pelos tributos **IBS** e **CBS**.\n\nDiferente do modelo anterior — no qual era necessário configurar as alíquotas de diversos impostos, neste novo cenário a **Spedy realiza automaticamente o cálculo dos tributos** com base nas **alíquotas padrão definidas para o período de transição da Reforma Tributária**.\n\nDurante essa fase, são aplicadas as seguintes alíquotas:\n- **IBS:** 0,1%\n- **CBS:** 0,9%\n\n### Campos necessários para o cálculo de IBS e CBS\n\nDurante a fase de transição da Reforma Tributária, a Spedy disponibiliza a **estrutura mínima necessária** para o cálculo e envio dos campos de IBS e CBS nas notas fiscais de serviço.\n\n⚠️ **Importante:**  \nNesse período, **os tributos atualmente vigentes (como ISS, PIS e COFINS) continuam obrigatórios** e **devem ser informados normalmente na nota fiscal**, conforme as regras atuais de cada município.\n\nOs valores de **IBS e CBS terão finalidade exclusivamente de teste operacional e adaptação dos sistemas**, permitindo que empresas, prefeituras e plataformas se preparem para o novo modelo tributário. **Não haverá arrecadação efetiva desses tributos durante a fase de transição.**\n\nPara habilitar o envio desses campos na nota fiscal, acesse:  \n**Configurações > Geral > Habilitar campos da Reforma Tributária**\n\nPara cada nota, será necessário informar os seguintes campos do grupo IBS/CBS (`ibsCbs`):\n\n- **CST (`cst`)** – Código da Situação Tributária\n- **Código de Classificação Tributária (`classification`)** – Código único que identifica o enquadramento tributário do serviço\n- **Código de Indicador de Operação (`operationIndicatorCode`)** – Código associado à natureza da operação tributária\n- **Uso ou consumo pessoal (`isPersonalUse`)** – Indica se a operação é destinada a uso ou consumo pessoal\n\n> Para consultar a **tabela de correlação entre Item da Lista de Serviço, NBS, Código de Classificação Tributária e Código de Indicador de Operação**, consulte o [material de referência](https://www.gov.br/nfse/pt-br/biblioteca/documentacao-tecnica/rtc/anexovii-indop_ibscbs_v1-00-00.xlsx/view).  \n> Esses campos podem ser configurados na Regra de Tributação, caso não sejam informados via API, conforme [artigo](https://ajuda.spedy.com.br/pt-br/article/entenda-como-atualizar-as-configuracoes-de-emissao-de-nfs-e-para-a-reforma-tributaria-2026-1rh3lbp/).\n---\n\n\n[Clique aqui](https://storage.crisp.chat/users/upload/session/-/1/8/1/f/181f0e08f152f400/requestnfseibscbs_1ckgrd7.json) para baixar um modelo de request da NFS-e, destacando os campos de IBS/CBS.\n\n## Nota Fiscal de Produto (NF-e)\n\nA adaptação da **NF-e** ao novo modelo tributário, incluindo IBS e CBS, já está disponível. Consulte a [Documentação de Referência](#tag/NF-e/paths/~1v1~1product-invoices/post).\n\nMais detalhes serão adicionados a esta documentação em breve.\n",
    "version": "v1",
    "x-logo": {
      "url": "https://docs.spedy.com.br/logo.svg",
      "altText": "Spedy"
    }
  },
  "paths": {
    "/v1/companies": {
      "get": {
        "tags": [
          "Empresas"
        ],
        "summary": "Listar Empresas",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGetAllDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Empresas"
        ],
        "summary": "Criar Empresa",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/companies/{id}": {
      "get": {
        "tags": [
          "Empresas"
        ],
        "summary": "Obter Empresa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "put": {
        "tags": [
          "Empresas"
        ],
        "summary": "Alterar Empresa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "Empresas"
        ],
        "summary": "Excluir Empresa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/companies/{id}/certificates": {
      "get": {
        "tags": [
          "Empresas"
        ],
        "summary": "Obter certificados",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID da empresa",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Empresas"
        ],
        "summary": "Adicionar certificado",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID da empresa",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "certificateFile",
                  "password"
                ],
                "type": "object",
                "properties": {
                  "certificateFile": {
                    "type": "string",
                    "description": "Arquivo do certificado digital no formato .pfx (PKCS#12)",
                    "format": "binary"
                  },
                  "password": {
                    "type": "string",
                    "description": "Senha do certificado digital"
                  }
                }
              },
              "encoding": {
                "certificateFile": {
                  "style": "form"
                },
                "password": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDigitalCertificateDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/companies/{id}/settings": {
      "put": {
        "tags": [
          "Empresas"
        ],
        "summary": "Alterar configurações",
        "description": "Atualiza as configurações fiscais da empresa (NF-e e/ou NFS-e).\r\n            \r\nCada bloco de configuração é independente: envie apenas o bloco que deseja atualizar.        \r\n            \r\nExemplo: para alterar apenas configurações de NFS-e, envie somente o bloco \"serviceInvoice\"\r\nsem incluir \"productInvoice\".",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID da empresa",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Configurações NF-e/NFS-e",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySettingsDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySettingsDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySettingsDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySettingsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySettingsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySettingsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/orders": {
      "get": {
        "tags": [
          "Vendas"
        ],
        "summary": "Listar Vendas",
        "parameters": [
          {
            "name": "initialDate",
            "in": "query",
            "description": "Data inicial da venda",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Data final da venda",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "transactionId",
            "in": "query",
            "description": "Código da Transação",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderGetAllDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Vendas"
        ],
        "summary": "Criar Venda",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPostDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPostDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPostDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPostDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/orders/{id}/invoices/issue": {
      "post": {
        "tags": [
          "Vendas"
        ],
        "summary": "Emitir notas fiscais da venda",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderIssueInvoicesDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderIssueInvoicesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderIssueInvoicesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderIssueInvoicesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/orders/{id}/status": {
      "put": {
        "tags": [
          "Vendas"
        ],
        "summary": "Alterar status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPutStatusDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPutStatusDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPutStatusDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderPutStatusDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrderGetDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderGetDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/orders/{id}/cancel": {
      "delete": {
        "tags": [
          "Vendas"
        ],
        "summary": "Cancelar venda",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCancelDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCancelDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCancelDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCancelDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/customers": {
      "get": {
        "tags": [
          "Clientes"
        ],
        "summary": "Listar Clientes",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerEditingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Clientes"
        ],
        "summary": "Criar Cliente",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerEditingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/customers/{id}": {
      "get": {
        "tags": [
          "Clientes"
        ],
        "summary": "Obter Cliente",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "put": {
        "tags": [
          "Clientes"
        ],
        "summary": "Alterar Cliente",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerEditingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "Clientes"
        ],
        "summary": "Excluir Cliente",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/products": {
      "get": {
        "tags": [
          "Produtos"
        ],
        "summary": "Listar Produtos",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPostDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Produtos"
        ],
        "summary": "Criar Produto",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPostDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/products/{id}": {
      "get": {
        "tags": [
          "Produtos"
        ],
        "summary": "Obter Produto",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductGetDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "put": {
        "tags": [
          "Produtos"
        ],
        "summary": "Alterar Produto",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPostDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPostDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "Produtos"
        ],
        "summary": "Excluir Produto",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices": {
      "get": {
        "tags": [
          "NF-e"
        ],
        "summary": "Listar Notas Fiscais",
        "parameters": [
          {
            "name": "effectiveDateStart",
            "in": "query",
            "description": "Data início de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "effectiveDateEnd",
            "in": "query",
            "description": "Data fim de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "transactionId",
            "in": "query",
            "description": "Código de Transação da Venda",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "query",
            "description": "ID de integração",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverFederalTaxNumber",
            "in": "query",
            "description": "CPF / CNPJ / Doc. estrangeiro",
            "schema": {
              "maxLength": 14,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "receiverName",
            "in": "query",
            "description": "Nome / Nome Fantasia do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverEmail",
            "in": "query",
            "description": "E-mail do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Criar NF-e",
        "description": "**integrationId** — Identificador da nota no seu sistema (máx. 36 caracteres). Recomendado em todas as integrações:\r\n            \r\n- **Associação:** vincula a NF-e gerada pela Spedy a um ID do seu sistema (ex: ID do pedido)\r\n- **Idempotência:** um segundo POST com o mesmo `integrationId` atualiza a nota existente em vez de criar uma nova — protege contra duplicidade em retries e timeouts\r\n- **Correção de rejeitada:** para corrigir uma NF-e rejeitada, reenvie o POST com os dados corrigidos e o mesmo `integrationId` — sem necessidade de deletar a nota anterior",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductInvoiceDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductInvoiceDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductInvoiceDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}": {
      "get": {
        "tags": [
          "NF-e"
        ],
        "summary": "Obter NF-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "NF-e"
        ],
        "summary": "Cancelar NF-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/pdf": {
      "get": {
        "tags": [
          "NF-e"
        ],
        "summary": "Download do PDF da NF-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/xml": {
      "get": {
        "tags": [
          "NF-e"
        ],
        "summary": "Download do XML da NF-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/disablement": {
      "get": {
        "tags": [
          "NF-e"
        ],
        "summary": "Listar inutilizações",
        "parameters": [
          {
            "name": "initialDate",
            "in": "query",
            "description": "Data inicial",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Data final",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DisabledInvoiceStatus"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Inutilização de numeração",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/check-status": {
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Consultar nota fiscal",
        "description": "Consulta o status da NF-e diretamente na SEFAZ e reconcilia o resultado no Spedy.\r\n            \r\nUse esta consulta para **reconciliar** uma nota cujo status no Spedy pode estar desatualizado em relação à SEFAZ:\r\n            \r\n- Nota marcada como **Rejeitada** no Spedy mas que consta **autorizada** na SEFAZ.\r\n- Nota cujo **acompanhamento automático** pós-envio esgotou as tentativas (a SEFAZ demorou a processar o lote) e ficou **travada** — a consulta destrava o processamento.\r\n            \r\n**Para apenas acompanhar o status (polling):** se você não usa webhooks e precisa verificar o status periodicamente,\r\nuse **Obter NF-e** (`GET /v1/product-invoices/{id}`) — retorna o status atual da nota sem acionar a SEFAZ.\r\nReserve este `check-status` para os casos de reconciliação/destrave acima.\r\n            \r\n**Quando NÃO usar:** não serve para \"furar a fila\" e forçar a emissão na hora. Enquanto a nota está **enfileirada**\r\npara emissão (ainda não enviada à SEFAZ), o endpoint responde **HTTP 400** — aguarde o processamento. Só há status\r\na consultar **depois** que a nota foi enviada à autoridade.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/corrections": {
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Carta de Correção",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductInvoiceCorrectionLetterRequestDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/issue": {
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Reemitir nota fiscal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/product-invoices/{id}/resend-email": {
      "post": {
        "tags": [
          "NF-e"
        ],
        "summary": "Reenviar e-mail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices": {
      "get": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Listar Notas Fiscais",
        "parameters": [
          {
            "name": "effectiveDateStart",
            "in": "query",
            "description": "Data início de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "effectiveDateEnd",
            "in": "query",
            "description": "Data fim de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "transactionId",
            "in": "query",
            "description": "Código de Transação da Venda",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "query",
            "description": "ID de integração",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverFederalTaxNumber",
            "in": "query",
            "description": "CPF / CNPJ / Doc. estrangeiro",
            "schema": {
              "maxLength": 14,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "receiverName",
            "in": "query",
            "description": "Nome / Nome Fantasia do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverEmail",
            "in": "query",
            "description": "E-mail do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Criar NFC-e",
        "description": "**integrationId** — Identificador da nota no seu sistema (máx. 36 caracteres). Recomendado em todas as integrações:\r\n            \r\n- **Associação:** vincula a NFC-e gerada pela Spedy a um ID do seu sistema (ex: ID do pedido)\r\n- **Idempotência:** um segundo POST com o mesmo `integrationId` atualiza a nota existente em vez de criar uma nova — protege contra duplicidade em retries e timeouts\r\n- **Correção de rejeitada:** para corrigir uma NFC-e rejeitada, reenvie o POST com os dados corrigidos e o mesmo `integrationId` — sem necessidade de deletar a nota anterior",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConsumerInvoiceDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConsumerInvoiceDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConsumerInvoiceDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConsumerInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}": {
      "get": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Obter NFC-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Cancelar NFC-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}/pdf": {
      "get": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Download do PDF da NFC-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}/xml": {
      "get": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Download do XML da NFC-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/disablement": {
      "get": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Listar inutilizações",
        "parameters": [
          {
            "name": "initialDate",
            "in": "query",
            "description": "Data inicial",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Data final",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DisabledInvoiceStatus"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Inutilização de numeração",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SefazInvoiceDisablementEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDisablementResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}/check-status": {
      "post": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Consultar nota fiscal",
        "description": "Consulta o status da NFC-e diretamente na SEFAZ e reconcilia o resultado no Spedy.\r\n            \r\nUse esta consulta para **reconciliar** uma nota cujo status no Spedy pode estar desatualizado em relação à SEFAZ:\r\n            \r\n- Nota marcada como **Rejeitada** no Spedy mas que consta **autorizada** na SEFAZ.\r\n- Nota cujo **acompanhamento automático** pós-envio esgotou as tentativas (a SEFAZ demorou a processar) e ficou **travada** — a consulta destrava o processamento.\r\n            \r\n**Para apenas acompanhar o status (polling):** se você não usa webhooks e precisa verificar o status periodicamente,\r\nuse **Obter NFC-e** (`GET /v1/consumer-invoices/{id}`) — retorna o status atual da nota sem acionar a SEFAZ.\r\nReserve este `check-status` para os casos de reconciliação/destrave acima.\r\n            \r\n**Quando NÃO usar:** não serve para \"furar a fila\" e forçar a emissão na hora. Enquanto a nota está **enfileirada**\r\npara emissão (ainda não enviada à SEFAZ), o endpoint responde **HTTP 400** — aguarde o processamento. Só há status\r\na consultar **depois** que a nota foi enviada à autoridade.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}/issue": {
      "post": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Reemitir nota fiscal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/consumer-invoices/{id}/resend-email": {
      "post": {
        "tags": [
          "NFC-e (Beta)"
        ],
        "summary": "Reenviar e-mail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices": {
      "get": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Listar Notas Fiscais",
        "parameters": [
          {
            "name": "effectiveDateStart",
            "in": "query",
            "description": "Data início de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "effectiveDateEnd",
            "in": "query",
            "description": "Data fim de competência",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "transactionId",
            "in": "query",
            "description": "Código de Transação da Venda",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "query",
            "description": "ID de integração",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverFederalTaxNumber",
            "in": "query",
            "description": "CPF / CNPJ / Doc. estrangeiro",
            "schema": {
              "maxLength": 14,
              "minLength": 0,
              "type": "string"
            }
          },
          {
            "name": "receiverName",
            "in": "query",
            "description": "Nome / Nome Fantasia do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiverEmail",
            "in": "query",
            "description": "E-mail do tomador",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Criar NFS-e",
        "description": "**integrationId** — Identificador da nota no seu sistema (máx. 36 caracteres). Recomendado em todas as integrações:\r\n            \r\n- **Associação:** vincula a NFS-e gerada pela Spedy a um ID do seu sistema (ex: ID do pedido)\r\n- **Idempotência:** um segundo POST com o mesmo `integrationId` atualiza a nota existente em vez de criar uma nova — protege contra duplicidade em retries e timeouts\r\n- **Correção de rejeitada:** para corrigir uma NFS-e rejeitada, reenvie o POST com os dados corrigidos e o mesmo `integrationId` — sem necessidade de deletar a nota anterior",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceInvoiceDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceInvoiceDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceInvoiceDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServiceInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}": {
      "get": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Obter NFS-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Cancelar NFS-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInvoiceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}/pdf": {
      "get": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Download do PDF da NFS-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}/xml": {
      "get": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Download do XML da NFS-e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "byte"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/cities": {
      "get": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Cidades integradas",
        "description": "Retorna a lista de municípios disponíveis para emissão de NFS-e, incluindo as configurações do provedor de cada cidade.\r\n            \r\nUse este endpoint para verificar, antes de integrar, quais requisitos técnicos um município exige:\r\n            \r\n**Campos do objeto `provider.options`:**\r\n            \r\n| Campo | Descrição |\r\n|---|---|\r\n| `rps` | Exige numeração de RPS |\r\n| `series` | Exige série de RPS |\r\n| `batchNumber` | Exige número de lote |\r\n| `requiresNumberInSequence` | RPS deve ser enviado em sequência rigorosa |\r\n| `requiresDigitalCertificate` | Exige certificado digital |\r\n| `federalServiceCode` | Exige código do item da lista de serviços LC 116/03 |\r\n| `nbsCode` | Exige código NBS (Nomenclatura Brasileira de Serviços) |\r\n| `supportsTaxReform` | Suporta campos de IBS/CBS da Reforma Tributária |\r\n| `useNationalLayout` | Utiliza o layout do Ambiente Nacional da NFS-e |\r\n| `authentication` | Tipo de autenticação exigido pela prefeitura |\r\n            \r\nO campo `nationalServiceInvoiceRegimes` indica para quais regimes tributários o município adotou o Emissor Nacional.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "Código",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Estado",
            "schema": {
              "$ref": "#/components/schemas/States"
            }
          },
          {
            "name": "filterText",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CityAvailableDtoPagedList"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityAvailableDtoPagedList"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityAvailableDtoPagedList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Listar Webhooks",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEditingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Criar Webhook",
        "description": "Webhooks são configurados por **conta**, não por empresa. Uma única configuração recebe eventos de\r\ntodas as empresas da conta. Para identificar qual empresa gerou o evento, utilize o objeto `company` presente no payload.\r\n            \r\n**Eventos disponíveis:**\r\n            \r\n| Evento | Descrição |\r\n|---|---|\r\n| `invoice.status_changed` | Qualquer alteração de status — criação, autorização, rejeição, cancelamento etc. |\r\n| `invoice.authorized` | Nota fiscal autorizada |\r\n| `invoice.rejected` | Nota fiscal rejeitada |\r\n| `invoice.canceled` | Nota fiscal cancelada |\r\n            \r\nO evento `invoice.status_changed` cobre todo o ciclo de vida da nota e é suficiente para a maioria das integrações.",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Obter Webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Alterar Webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEditingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEditingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Excluir Webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}/check-status": {
      "post": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Consultar nota fiscal",
        "description": "Consulta o status da NFS-e diretamente na prefeitura e reconcilia o resultado no Spedy.\r\n            \r\nUse esta consulta para **reconciliar** uma nota cujo status no Spedy pode estar desatualizado em relação à prefeitura:\r\n            \r\n- Nota marcada como **Rejeitada** no Spedy mas que consta **autorizada** na prefeitura.\r\n- Nota cujo **acompanhamento automático** pós-envio esgotou as tentativas (a prefeitura demorou a processar) e ficou **travada** — a consulta destrava o processamento.\r\n            \r\n**Para apenas acompanhar o status (polling):** se você não usa webhooks e precisa verificar o status periodicamente,\r\nuse **Obter NFS-e** (`GET /v1/service-invoices/{id}`) — retorna o status atual da nota sem acionar a prefeitura.\r\nReserve este `check-status` para os casos de reconciliação/destrave acima.\r\n            \r\n**Quando NÃO usar:** não serve para \"furar a fila\" e forçar a emissão na hora. Enquanto a nota está **enfileirada**\r\npara emissão (ainda não enviada à prefeitura), o endpoint responde **HTTP 400** — aguarde o processamento. Só há\r\nstatus a consultar **depois** que a nota foi enviada à autoridade.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceInvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}/issue": {
      "post": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Reemitir nota fiscal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceIssueInvoicesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/service-invoices/{id}/resend-email": {
      "post": {
        "tags": [
          "NFS-e"
        ],
        "summary": "Reenviar e-mail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/webhooks/{id}/disable": {
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Desabilitar Webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    },
    "/v1/webhooks/{id}/enable": {
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Habilitar Webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request — Erro de validação ou regra de negócio"
          },
          "403": {
            "description": "Forbidden — Chave de API inválida"
          },
          "429": {
            "description": "Too Many Requests — Limite de requisições atingido"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddressCountryDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Nome"
          },
          "code": {
            "type": "integer",
            "description": "Código BACEN do País",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddressCreateDto": {
        "type": "object",
        "properties": {
          "street": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "description": "Logradouro",
            "nullable": true
          },
          "district": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "description": "Bairro",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "CEP",
            "nullable": true
          },
          "number": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "description": "Número",
            "nullable": true
          },
          "additionalInformation": {
            "maxLength": 150,
            "minLength": 0,
            "type": "string",
            "description": "Complemento",
            "nullable": true
          },
          "city": {
            "$ref": "#/components/schemas/CityCreateDto"
          },
          "country": {
            "type": "string",
            "description": "Sigla do País (padrão ISO 3166-1 https://bit.ly/4cpb1Dh)\r\nExemplo: BRA, USA, ARG",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddressDto": {
        "type": "object",
        "properties": {
          "street": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "description": "Logradouro",
            "nullable": true
          },
          "district": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string",
            "description": "Bairro",
            "nullable": true
          },
          "postalCode": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "CEP",
            "nullable": true
          },
          "number": {
            "maxLength": 10,
            "minLength": 0,
            "type": "string",
            "description": "Número",
            "nullable": true
          },
          "additionalInformation": {
            "maxLength": 150,
            "minLength": 0,
            "type": "string",
            "description": "Complemento",
            "nullable": true
          },
          "city": {
            "$ref": "#/components/schemas/CityDto"
          },
          "country": {
            "$ref": "#/components/schemas/AddressCountryDto"
          },
          "cityName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Endereço"
      },
      "ApiCredentialsDto": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "description": "Chave de API",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CacheEntryDto": {
        "type": "object",
        "properties": {
          "cacheName": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CancelInvoiceRequestDto": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CarrierDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome",
            "nullable": true
          },
          "legalName": {
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "Cadastro Nacional da Pessoa Jurídica",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição municipal",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição estadual",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          }
        },
        "additionalProperties": false,
        "description": "Transportadora"
      },
      "CityAvailableDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Código",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Nome",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Estado",
            "nullable": true
          },
          "provider": {
            "$ref": "#/components/schemas/CityProviderAvailableDto"
          },
          "nationalServiceInvoiceRegimes": {
            "$ref": "#/components/schemas/NationalServiceInvoiceRegimes"
          }
        },
        "additionalProperties": false
      },
      "CityAvailableDtoPagedList": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pageCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CityAvailableDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CityCreateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome [xMun]",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Estado [UF]",
            "nullable": true
          },
          "code": {
            "type": "integer",
            "description": "Código IBGE",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CityDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Código IBGE",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Nome",
            "nullable": true
          },
          "state": {
            "$ref": "#/components/schemas/States"
          }
        },
        "additionalProperties": false
      },
      "CityProviderAvailableDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome do provedor",
            "nullable": true
          },
          "options": {
            "$ref": "#/components/schemas/CityProviderOptionsAvailableDto"
          }
        },
        "additionalProperties": false
      },
      "CityProviderOptionsAvailableDto": {
        "type": "object",
        "properties": {
          "rps": {
            "type": "boolean",
            "description": "Utiliza número de RPS"
          },
          "series": {
            "type": "boolean",
            "description": "Utiliza série de RPS"
          },
          "batchNumber": {
            "type": "boolean",
            "description": "Utiliza o número do próximo lote"
          },
          "invoiceNumber": {
            "type": "boolean",
            "description": "Envia o número da NF"
          },
          "requiresNumberInSequence": {
            "type": "boolean",
            "description": "Número de RPS em sequência"
          },
          "federalServiceCode": {
            "type": "boolean",
            "description": "Utiliza o item da lista de serviço (LC 116/03)"
          },
          "nbsCode": {
            "type": "boolean",
            "description": "Utiliza o Código NBS"
          },
          "newBatchNumberForEachAttempt": {
            "type": "boolean",
            "description": "Número do lote para cada tentativa"
          },
          "removeAccents": {
            "type": "boolean",
            "description": "Remover acentos"
          },
          "supportsTaxReform": {
            "type": "boolean",
            "description": "Suporta campos da Reforma Tributária"
          },
          "useNationalLayout": {
            "type": "boolean",
            "description": "Utiliza layout do Ambiente Nacional"
          },
          "nationalTaxationCode": {
            "type": "boolean",
            "description": "Utiliza código de Tributação Nacional"
          },
          "useSimplesNacionalAnnex": {
            "type": "boolean",
            "description": "Utiliza anexo do Simples Nacional"
          },
          "authentication": {
            "$ref": "#/components/schemas/SemfazEndpointProviderSettingsAuthentication"
          },
          "requiresDigitalCertificate": {
            "type": "boolean",
            "description": "Requer certificado digital"
          }
        },
        "additionalProperties": false
      },
      "CitySimpleDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Código IBGE",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Nome",
            "nullable": true
          },
          "state": {
            "$ref": "#/components/schemas/States"
          }
        },
        "additionalProperties": false
      },
      "CompanyDigitalCertificateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "expirationAt": {
            "type": "string",
            "description": "Data de expiração do certificado",
            "format": "date-time"
          },
          "subject": {
            "type": "string",
            "description": "Titular do certificado (CN — Common Name)",
            "nullable": true
          },
          "issuer": {
            "type": "string",
            "description": "Autoridade certificadora emissora",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Indica se este é o certificado ativo da empresa"
          }
        },
        "additionalProperties": false
      },
      "CompanyEconomicActivityDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Código da atividade (CNAE)",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/CompanyEconomicActivityType"
          }
        },
        "additionalProperties": false
      },
      "CompanyEconomicActivityType": {
        "enum": [
          "main",
          "secondary"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>main</b>: Atividade principal</li>\n<li><b>secondary</b>: Atividade secundária</li>\n</ul>\n"
      },
      "CompanyEditingDto": {
        "required": [
          "address",
          "federalTaxNumber",
          "legalName",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Nome fantasia"
          },
          "legalName": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Razão Social"
          },
          "federalTaxNumber": {
            "minLength": 1,
            "type": "string",
            "description": "CNPJ"
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição Estadual",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição Municipal",
            "nullable": true
          },
          "email": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          },
          "taxRegime": {
            "$ref": "#/components/schemas/TaxRegime"
          },
          "specialTaxRegime": {
            "$ref": "#/components/schemas/SpecialTaxRegime"
          },
          "simplesNacionalTaxRegime": {
            "$ref": "#/components/schemas/SimplesNacionalTaxRegime"
          },
          "economicActivities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyEconomicActivityDto"
            },
            "description": "Atividades econômicas (CNAE)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompanyGetAllDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Nome fantasia",
            "nullable": true
          },
          "legalName": {
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "CNPJ",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          }
        },
        "additionalProperties": false
      },
      "CompanyGetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Nome fantasia",
            "nullable": true
          },
          "legalName": {
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "CNPJ",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição Estadual",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição Municipal",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          },
          "taxRegime": {
            "$ref": "#/components/schemas/TaxRegime"
          },
          "specialTaxRegime": {
            "$ref": "#/components/schemas/SpecialTaxRegime"
          },
          "simplesNacionalTaxRegime": {
            "$ref": "#/components/schemas/SimplesNacionalTaxRegime"
          },
          "apiCredentials": {
            "$ref": "#/components/schemas/ApiCredentialsDto"
          },
          "economicActivities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyEconomicActivityDto"
            },
            "description": "Atividades econômicas (CNAE)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompanySettingsApproximateTaxesMode": {
        "enum": [
          "disabled",
          "detailed",
          "simplified"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>disabled</b>: Desabilitado</li>\n<li><b>detailed</b>: Detalhado</li>\n<li><b>simplified</b>: Simplificado</li>\n</ul>\n"
      },
      "CompanySettingsConsumerInvoiceDto": {
        "type": "object",
        "properties": {
          "series": {
            "type": "string",
            "description": "Série",
            "nullable": true
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "nextNumber": {
            "type": "integer",
            "description": "Número da próxima Nota Fiscal",
            "format": "int64",
            "nullable": true
          },
          "tokenId": {
            "type": "string",
            "description": "ID do token para geração do QR Code",
            "nullable": true
          },
          "csc": {
            "type": "string",
            "description": "Código de Segurança do Contribuinte para geração do QR Code",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Configurações de NFC-e"
      },
      "CompanySettingsDanfeLayout": {
        "enum": [
          "default",
          "simplified"
        ],
        "type": "string",
        "description": "Layout de impressão do DANFE<p>Valores possíveis:</p>\n<ul>\n<li><b>default</b>: Layout padrão</li>\n<li><b>simplified</b>: Layout simplificado</li>\n</ul>\n"
      },
      "CompanySettingsDto": {
        "type": "object",
        "properties": {
          "serviceInvoice": {
            "$ref": "#/components/schemas/CompanySettingsServiceInvoiceDto"
          },
          "productInvoice": {
            "$ref": "#/components/schemas/CompanySettingsProductInvoiceDto"
          },
          "consumerInvoice": {
            "$ref": "#/components/schemas/CompanySettingsConsumerInvoiceDto"
          },
          "general": {
            "$ref": "#/components/schemas/CompanySettingsGeneralDto"
          }
        },
        "additionalProperties": false,
        "description": "Configurações de emissão da empresa, separadas por modelo de nota fiscal"
      },
      "CompanySettingsGeneralDto": {
        "type": "object",
        "properties": {
          "allowDuplicateFederalTaxNumbers": {
            "type": "boolean",
            "description": "Permite cadastrar clientes com mesmo CPF/CNPJ",
            "default": false
          },
          "allowNaturalPersonCompany": {
            "type": "boolean",
            "description": "Permite que a Owner cadastre empresas emissoras como pessoa física (CPF) via API pública",
            "nullable": true
          },
          "allowMultipleInvoiceModelsPerOrder": {
            "type": "boolean",
            "description": "Permite múltiplos modelos de nota fiscal por venda",
            "default": false
          },
          "decimalPrecision": {
            "type": "integer",
            "description": "Quantidade de casas decimais em valores monetários",
            "format": "int32",
            "default": 2,
            "nullable": true
          },
          "taxReformFieldsEnabled": {
            "type": "boolean",
            "description": "Habilitar campos da Reforma Tributária",
            "default": false
          }
        },
        "additionalProperties": false
      },
      "CompanySettingsInvoiceSendCityTaxNumber": {
        "enum": [
          "automatic",
          "yes",
          "no"
        ],
        "type": "string",
        "description": "Enviar Inscrição Municipal (apenas para Ambiente Nacional)<p>Valores possíveis:</p>\n<ul>\n<li><b>automatic</b>: Automático</li>\n<li><b>yes</b>: Sim</li>\n<li><b>no</b>: Não</li>\n</ul>\n"
      },
      "CompanySettingsProductInvoiceDto": {
        "type": "object",
        "properties": {
          "series": {
            "type": "string",
            "description": "Série",
            "nullable": true
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "nextNumber": {
            "type": "integer",
            "description": "Número da próxima Nota Fiscal",
            "format": "int64",
            "nullable": true
          },
          "danfePrintLayout": {
            "$ref": "#/components/schemas/CompanySettingsDanfeLayout"
          }
        },
        "additionalProperties": false
      },
      "CompanySettingsServiceInvoiceDto": {
        "type": "object",
        "properties": {
          "series": {
            "type": "string",
            "description": "Série",
            "nullable": true
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "issueType": {
            "$ref": "#/components/schemas/InvoiceIssueType"
          },
          "userName": {
            "type": "string",
            "description": "Usuário",
            "nullable": true
          },
          "password": {
            "type": "string",
            "description": "Credencial de acesso ao provedor.\r\nDependendo do provedor, pode representar a senha de acesso, token de autenticação ou chave de API.",
            "nullable": true
          },
          "nextBatchNumber": {
            "type": "integer",
            "description": "Número do próximo Lote",
            "format": "int32",
            "nullable": true
          },
          "authNumber": {
            "type": "string",
            "description": "Número de autenticação do provedor.\r\nCorresponde à chave privada no Sigep ou ao número da AEDF no Softplan.\r\nObrigatório somente para esses provedores.",
            "nullable": true
          },
          "nextNumber": {
            "type": "integer",
            "description": "Número do próximo RPS/DPS ou NF",
            "format": "int64",
            "nullable": true
          },
          "sendCityTaxNumber": {
            "$ref": "#/components/schemas/CompanySettingsInvoiceSendCityTaxNumber"
          }
        },
        "additionalProperties": false
      },
      "ConsumerInvoiceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da NF",
            "format": "uuid"
          },
          "integrationId": {
            "type": "string",
            "description": "ID de integração",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "model": {
            "$ref": "#/components/schemas/InvoiceModel"
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência",
            "format": "date-time",
            "nullable": true
          },
          "receiver": {
            "$ref": "#/components/schemas/InvoiceReceiverDto"
          },
          "company": {
            "$ref": "#/components/schemas/InvoiceCompanyDto"
          },
          "order": {
            "$ref": "#/components/schemas/InvoiceOrderDto"
          },
          "authorization": {
            "$ref": "#/components/schemas/InvoiceAuthorizationDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total da NF",
            "format": "double"
          },
          "number": {
            "type": "integer",
            "description": "Número",
            "format": "int64",
            "nullable": true
          },
          "processingDetail": {
            "$ref": "#/components/schemas/InvoiceProcessingDetailDto"
          },
          "accessKey": {
            "type": "string",
            "nullable": true
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "operationType": {
            "$ref": "#/components/schemas/InvoiceOperationType"
          },
          "printingType": {
            "$ref": "#/components/schemas/PrintingType"
          },
          "issueType": {
            "$ref": "#/components/schemas/InvoiceIssueType"
          },
          "purposeType": {
            "$ref": "#/components/schemas/SefazInvoicePurposeType"
          },
          "debitType": {
            "$ref": "#/components/schemas/SefazInvoiceDebitType"
          },
          "creditType": {
            "$ref": "#/components/schemas/SefazInvoiceCreditType"
          },
          "govPurchase": {
            "$ref": "#/components/schemas/SefazInvoiceGovPurchaseDto"
          },
          "govOperationType": {
            "$ref": "#/components/schemas/SefazInvoiceGovOperationType"
          }
        },
        "additionalProperties": false
      },
      "ConsumerInvoiceDtoPagedList": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pageCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsumerInvoiceDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateConsumerInvoiceDto": {
        "required": [
          "isFinalCustomer"
        ],
        "type": "object",
        "properties": {
          "integrationId": {
            "maxLength": 36,
            "minLength": 0,
            "type": "string",
            "description": "Identificador único da nota fiscal no sistema do cliente (máx. 36 caracteres).",
            "nullable": true
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão [dhEmi]",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência [dCompet]",
            "format": "date-time"
          },
          "number": {
            "type": "integer",
            "description": "Número da NF [nNF]",
            "format": "int64",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "additionalInformation": {
            "type": "string",
            "description": "Informações adicionais [infCpl]",
            "nullable": true
          },
          "sendEmailToCustomer": {
            "type": "boolean",
            "description": "Enviar e-mail para o cliente / tomador"
          },
          "series": {
            "type": "string",
            "description": "Série [serie]",
            "nullable": true
          },
          "printingType": {
            "$ref": "#/components/schemas/PrintingType"
          },
          "operationType": {
            "$ref": "#/components/schemas/InvoiceOperationType"
          },
          "purposeType": {
            "$ref": "#/components/schemas/SefazInvoicePurposeType"
          },
          "issueType": {
            "$ref": "#/components/schemas/InvoiceIssueType"
          },
          "operationNature": {
            "type": "string",
            "description": "Natureza de Operação [natOp]",
            "nullable": true
          },
          "operationDate": {
            "type": "string",
            "description": "Data da Operação [dhSaiEnt]",
            "format": "date-time",
            "nullable": true
          },
          "destination": {
            "$ref": "#/components/schemas/SefazInvoiceDestinationType"
          },
          "presenceType": {
            "$ref": "#/components/schemas/SefazInvoicePresenceType"
          },
          "receiver": {
            "$ref": "#/components/schemas/SefazInvoiceReceiverDto"
          },
          "transport": {
            "$ref": "#/components/schemas/SefazInvoiceTransportDto"
          },
          "billing": {
            "$ref": "#/components/schemas/SefazInvoiceBillingDto"
          },
          "duplicates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceBillingDuplicateDto"
            },
            "description": "Faturas",
            "nullable": true
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoicePaymentDto"
            },
            "description": "Pagamentos [pag]",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceItemDto"
            },
            "description": "Itens da nota [det]",
            "nullable": true
          },
          "referencedDocuments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceReferencedDocumentDto"
            },
            "description": "Documentos Fiscais Referenciados [NFref]",
            "nullable": true
          },
          "total": {
            "$ref": "#/components/schemas/SefazInvoiceTotalDto"
          },
          "accessKey": {
            "type": "string",
            "description": "Chave de acesso [Id]",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Código Numérico [cNF]",
            "nullable": true
          },
          "isFinalCustomer": {
            "type": "boolean",
            "description": "Consumidor Final [indFinal]"
          },
          "debitType": {
            "$ref": "#/components/schemas/SefazInvoiceDebitType"
          },
          "creditType": {
            "$ref": "#/components/schemas/SefazInvoiceCreditType"
          },
          "govPurchase": {
            "$ref": "#/components/schemas/SefazInvoiceGovPurchaseDto"
          },
          "govOperationType": {
            "$ref": "#/components/schemas/SefazInvoiceGovOperationType"
          }
        },
        "additionalProperties": false
      },
      "CreateProductInvoiceDto": {
        "required": [
          "isFinalCustomer"
        ],
        "type": "object",
        "properties": {
          "integrationId": {
            "maxLength": 36,
            "minLength": 0,
            "type": "string",
            "description": "Identificador único da nota fiscal no sistema do cliente (máx. 36 caracteres).",
            "nullable": true
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão [dhEmi]",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência [dCompet]",
            "format": "date-time"
          },
          "number": {
            "type": "integer",
            "description": "Número da NF [nNF]",
            "format": "int64",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "additionalInformation": {
            "type": "string",
            "description": "Informações adicionais [infCpl]",
            "nullable": true
          },
          "sendEmailToCustomer": {
            "type": "boolean",
            "description": "Enviar e-mail para o cliente / tomador"
          },
          "series": {
            "type": "string",
            "description": "Série [serie]",
            "nullable": true
          },
          "printingType": {
            "$ref": "#/components/schemas/PrintingType"
          },
          "operationType": {
            "$ref": "#/components/schemas/InvoiceOperationType"
          },
          "purposeType": {
            "$ref": "#/components/schemas/SefazInvoicePurposeType"
          },
          "issueType": {
            "$ref": "#/components/schemas/InvoiceIssueType"
          },
          "operationNature": {
            "type": "string",
            "description": "Natureza de Operação [natOp]",
            "nullable": true
          },
          "operationDate": {
            "type": "string",
            "description": "Data da Operação [dhSaiEnt]",
            "format": "date-time",
            "nullable": true
          },
          "destination": {
            "$ref": "#/components/schemas/SefazInvoiceDestinationType"
          },
          "presenceType": {
            "$ref": "#/components/schemas/SefazInvoicePresenceType"
          },
          "receiver": {
            "$ref": "#/components/schemas/SefazInvoiceReceiverDto"
          },
          "transport": {
            "$ref": "#/components/schemas/SefazInvoiceTransportDto"
          },
          "billing": {
            "$ref": "#/components/schemas/SefazInvoiceBillingDto"
          },
          "duplicates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceBillingDuplicateDto"
            },
            "description": "Faturas",
            "nullable": true
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoicePaymentDto"
            },
            "description": "Pagamentos [pag]",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceItemDto"
            },
            "description": "Itens da nota [det]",
            "nullable": true
          },
          "referencedDocuments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceReferencedDocumentDto"
            },
            "description": "Documentos Fiscais Referenciados [NFref]",
            "nullable": true
          },
          "total": {
            "$ref": "#/components/schemas/SefazInvoiceTotalDto"
          },
          "accessKey": {
            "type": "string",
            "description": "Chave de acesso [Id]",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Código Numérico [cNF]",
            "nullable": true
          },
          "isFinalCustomer": {
            "type": "boolean",
            "description": "Consumidor Final [indFinal]"
          },
          "debitType": {
            "$ref": "#/components/schemas/SefazInvoiceDebitType"
          },
          "creditType": {
            "$ref": "#/components/schemas/SefazInvoiceCreditType"
          },
          "govPurchase": {
            "$ref": "#/components/schemas/SefazInvoiceGovPurchaseDto"
          },
          "govOperationType": {
            "$ref": "#/components/schemas/SefazInvoiceGovOperationType"
          }
        },
        "additionalProperties": false
      },
      "CreateServiceInvoiceDto": {
        "required": [
          "description",
          "total"
        ],
        "type": "object",
        "properties": {
          "integrationId": {
            "maxLength": 36,
            "minLength": 0,
            "type": "string",
            "description": "Identificador único da nota fiscal no sistema do cliente (máx. 36 caracteres).",
            "nullable": true
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão [dhEmi]",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência [dCompet]",
            "format": "date-time"
          },
          "receiver": {
            "$ref": "#/components/schemas/InvoiceReceiverDto"
          },
          "number": {
            "type": "integer",
            "description": "Número da NF [nNF]",
            "format": "int64",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "additionalInformation": {
            "type": "string",
            "description": "Informações adicionais [infCpl]",
            "nullable": true
          },
          "sendEmailToCustomer": {
            "type": "boolean",
            "description": "Enviar e-mail para o cliente / tomador"
          },
          "description": {
            "minLength": 1,
            "type": "string",
            "description": "Discriminação dos serviços"
          },
          "batchNumber": {
            "type": "integer",
            "description": "Número do Lote",
            "format": "int32",
            "nullable": true
          },
          "rpsNumber": {
            "type": "integer",
            "description": "Número do RPS",
            "format": "int64",
            "nullable": true
          },
          "rpsSeries": {
            "type": "string",
            "description": "Série do RPS",
            "nullable": true
          },
          "cnaeCode": {
            "type": "string",
            "description": "Código CNAE",
            "nullable": true
          },
          "nbsCode": {
            "type": "string",
            "description": "Código NBS",
            "nullable": true
          },
          "federalServiceCode": {
            "type": "string",
            "description": "Código do Item da Lista de Serviço (LC 116/03)",
            "nullable": true
          },
          "nationalTaxationCode": {
            "type": "string",
            "description": "Código de Tributação Nacional",
            "nullable": true
          },
          "cityServiceCode": {
            "type": "string",
            "description": "Código do serviço no munícipio",
            "nullable": true
          },
          "taxationType": {
            "$ref": "#/components/schemas/ServiceInvoiceTaxationType"
          },
          "cstPisCofins": {
            "type": "string",
            "description": "Cod. Situação Tributária de PIS/COFINS (Apenas p/ Ambiente Nacional)",
            "nullable": true
          },
          "simplesNacionalAnnex": {
            "type": "string",
            "description": "Anexo do Simples Nacional.\r\nObrigatório somente para os provedores Conan e Webfisco.\r\nValores aceitos: I, II, III, IV, V.",
            "nullable": true
          },
          "total": {
            "$ref": "#/components/schemas/ServiceInvoiceTotalDto"
          },
          "location": {
            "$ref": "#/components/schemas/CitySimpleDto"
          },
          "taxLocation": {
            "$ref": "#/components/schemas/ServiceInvoiceLocation"
          },
          "ibsCbs": {
            "$ref": "#/components/schemas/ServiceInvoiceIbsCbsDto"
          },
          "national": {
            "$ref": "#/components/schemas/ServiceInvoiceNationalDto"
          },
          "approximateTaxes": {
            "$ref": "#/components/schemas/ServiceInvoiceApproximateTaxRatesDto"
          }
        },
        "additionalProperties": false
      },
      "CustomerDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Nome / Nome Fantasia"
          },
          "legalName": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "maxLength": 14,
            "minLength": 0,
            "type": "string",
            "description": "CPF /CNPJ / Doc. estrangeiro",
            "nullable": true
          },
          "cityTaxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Inscrição Municipal",
            "nullable": true
          },
          "stateTaxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Inscrição Estadual",
            "nullable": true
          },
          "email": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          }
        },
        "additionalProperties": false
      },
      "CustomerEditingDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Nome / Nome Fantasia"
          },
          "legalName": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "maxLength": 14,
            "minLength": 0,
            "type": "string",
            "description": "CPF / CNPJ / Doc estrangeiro",
            "nullable": true
          },
          "stateTaxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Inscrição Estadual (opcional). Informar somente números ou `ISENTO`",
            "nullable": true
          },
          "cityTaxNumber": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Inscrição Municipal",
            "nullable": true
          },
          "email": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phone": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "mobilePhone": {
            "maxLength": 15,
            "minLength": 0,
            "type": "string",
            "description": "Celular",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          }
        },
        "additionalProperties": false
      },
      "DisabledInvoiceStatus": {
        "enum": [
          "inProcessing",
          "registered",
          "rejected",
          "error"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>inProcessing</b>: Em Processamento</li>\n<li><b>registered</b>: Registrado</li>\n<li><b>rejected</b>: Rejeitado</li>\n<li><b>error</b>: Erro</li>\n</ul>\n"
      },
      "EnvironmentType": {
        "enum": [
          "production",
          "development",
          "simulation"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>production</b>: Produção</li>\n<li><b>development</b>: Homologação</li>\n<li><b>simulation</b>: </li>\n</ul>\n"
      },
      "InvoiceAuthorizationDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Data de autorização pela SEFAZ ou Prefeitura",
            "format": "date-time",
            "nullable": true
          },
          "protocol": {
            "type": "string",
            "description": "Protocolo de autorização",
            "nullable": true
          },
          "digestValue": {
            "type": "string",
            "description": "Digest value do XML autorizado",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Dados de autorização da nota fiscal"
      },
      "InvoiceCancellationDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "protocol": {
            "type": "string",
            "nullable": true
          },
          "justification": {
            "type": "string",
            "nullable": true
          },
          "responseTime": {
            "type": "string",
            "format": "date-span"
          }
        },
        "additionalProperties": false
      },
      "InvoiceCompanyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome fantasia",
            "nullable": true
          },
          "legalName": {
            "type": "string",
            "description": "Razão Social",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "CNPJ",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição Estadual",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição Municipal",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceDisablementResultDto": {
        "type": "object",
        "properties": {
          "identifier": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "initialNumber": {
            "type": "integer",
            "format": "int64"
          },
          "finalNumber": {
            "type": "integer",
            "format": "int64"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "protocolNumber": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/DisabledInvoiceStatus"
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "messageCode": {
            "type": "string",
            "nullable": true
          },
          "messageText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceDisablementResultDtoPagedList": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pageCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDisablementResultDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceGovernmentEntityType": {
        "enum": [
          "union",
          "state",
          "federal",
          "city"
        ],
        "type": "string",
        "description": "Tipo de ente governamental — NT 2025.002 Reforma Tributária<p>Valores possíveis:</p>\n<ul>\n<li><b>union</b>: União</li>\n<li><b>state</b>: Estado</li>\n<li><b>federal</b>: Distrito Federal</li>\n<li><b>city</b>: Município</li>\n</ul>\n"
      },
      "InvoiceIbsCbsOperationType": {
        "enum": [
          "supplyWithSubsequentPayment",
          "paymentReceivedAfterSupply",
          "supplyWithPriorPayment",
          "paymentReceivedBeforeSupply",
          "simultaneousSupplyAndPayment"
        ],
        "type": "string",
        "description": "Tipo de operação com entes governamentais ou bens imóveis — NT 2025.002 Reforma Tributária<p>Valores possíveis:</p>\n<ul>\n<li><b>supplyWithSubsequentPayment</b>: Fornecimento com pagamento posterior</li>\n<li><b>paymentReceivedAfterSupply</b>: Recebimento do pagamento com fornecimento já realizado</li>\n<li><b>supplyWithPriorPayment</b>: Fornecimento com pagamento já realizado</li>\n<li><b>paymentReceivedBeforeSupply</b>: Recebimento do pagamento com fornecimento posterior</li>\n<li><b>simultaneousSupplyAndPayment</b>: Fornecimento e recebimento do pagamento concomitantes</li>\n</ul>\n"
      },
      "InvoiceIssueInvoicesDto": {
        "type": "object",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência para emissão da nota fiscal. Se não informada, utiliza a data original da nota.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceIssueType": {
        "enum": [
          "normal",
          "fsia",
          "scan",
          "epec",
          "fsda",
          "svcan",
          "svcrs",
          "offLine",
          "website",
          "annfs",
          "alt"
        ],
        "type": "string",
        "description": "Forma de emissão da NF-e<p>Valores possíveis:</p>\n<ul>\n<li><b>normal</b>: Emissão normal (não em contingência)</li>\n<li><b>fSIA</b>: Contingência FS-IA — DANFE em formulário de segurança com impressão no verso</li>\n<li><b>sCAN</b>: Contingência SCAN — Sistema de Contingência do Ambiente Nacional (desativado)</li>\n<li><b>ePEC</b>: Contingência EPEC — Declaração Prévia de Emissão em Contingência</li>\n<li><b>fSDA</b>: Contingência FS-DA — DANFE em formulário de segurança sem impressão no verso</li>\n<li><b>sVCAN</b>: Contingência SVC-AN — SEFAZ Virtual de Contingência do Ambiente Nacional</li>\n<li><b>sVCRS</b>: Contingência SVC-RS — SEFAZ Virtual de Contingência do Rio Grande do Sul</li>\n<li><b>offLine</b>: Contingência off-line</li>\n<li><b>website</b>: Website do provedor (NFS-e)</li>\n<li><b>aNNFS</b>: Ambiente Nacional da NFS-e</li>\n<li><b>alt</b>: Ambiente alternativo do provedor (NFS-e)</li>\n</ul>\n"
      },
      "InvoiceIssuerDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceModel": {
        "enum": [
          "productInvoice",
          "consumerInvoice",
          "serviceInvoice"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>productInvoice</b>: NF-e</li>\n<li><b>consumerInvoice</b>: NFC-e</li>\n<li><b>serviceInvoice</b>: NFS-e</li>\n</ul>\n"
      },
      "InvoiceOperationType": {
        "enum": [
          "incoming",
          "outgoing"
        ],
        "type": "string",
        "description": "Tipo de operação da nota fiscal<p>Valores possíveis:</p>\n<ul>\n<li><b>incoming</b>: Entrada</li>\n<li><b>outgoing</b>: Saída</li>\n</ul>\n"
      },
      "InvoiceOrderDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "transactionId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceProcessingDetailDto": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/InvoiceProcessingStatus"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "on": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvoiceProcessingStatus": {
        "enum": [
          "processing",
          "success",
          "failed"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>processing</b>: Em processamento — evento na fila aguardando execução</li>\n<li><b>success</b>: Processado com sucesso — indica que o evento foi executado, não que a nota foi autorizada. Uma nota rejeitada também terá status Success.</li>\n<li><b>failed</b>: Falha interna no processamento do evento na fila (erro de infraestrutura)</li>\n</ul>\n"
      },
      "InvoiceReceiverDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome [xName]",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "CPF / CNPJ / Doc Estrangeiro ( [CPF] / [CNPJ] )",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição estadual [IE]",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição municipal",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "E-mail [email]",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "InvoiceStatus": {
        "enum": [
          "created",
          "enqueued",
          "received",
          "authorized",
          "inContingent",
          "rejected",
          "canceled",
          "denied",
          "removed",
          "disabled"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>created</b>: Criada — aguarda emissão explícita via issue ou gatilho automático (ex: afterPayment)</li>\n<li><b>enqueued</b>: Enfileirada para processamento junto à SEFAZ ou Prefeitura</li>\n<li><b>received</b>: Recebido</li>\n<li><b>authorized</b>: Autorizado</li>\n<li><b>inContingent</b>: Em contingência</li>\n<li><b>rejected</b>: Rejeitado</li>\n<li><b>canceled</b>: Cancelado</li>\n<li><b>denied</b>: Denegado</li>\n<li><b>removed</b>: Removido</li>\n<li><b>disabled</b>: Inutilizado</li>\n</ul>\n"
      },
      "NationalServiceInvoiceRegimes": {
        "enum": [
          "none",
          "all",
          "mei",
          "simplesNacional",
          "regimeNormal"
        ],
        "type": "string",
        "description": "Regime tributário para o qual o município adotou o Emissor Nacional da NFS-e<p>Valores possíveis:</p>\n<ul>\n<li><b>none</b>: Nenhum — município não utiliza o Emissor Nacional</li>\n<li><b>all</b>: Todos os regimes tributários</li>\n<li><b>mEI</b>: Apenas MEI (Microempreendedor Individual)</li>\n<li><b>simplesNacional</b>: Apenas Simples Nacional</li>\n<li><b>regimeNormal</b>: Apenas Regime Normal (Lucro Presumido ou Lucro Real)</li>\n</ul>\n"
      },
      "OrderCancelDto": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "minLength": 1,
            "type": "string",
            "description": "Motivo do cancelamento"
          }
        },
        "additionalProperties": false
      },
      "OrderEventDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome do evento",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Data de início da atividade de evento",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "description": "Data de fim da atividade de evento",
            "format": "date-time"
          },
          "identifier": {
            "type": "string",
            "description": "Identificação da Atividade de Evento",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "OrderFreightDto": {
        "type": "object",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/CarrierDto"
          },
          "modality": {
            "$ref": "#/components/schemas/SefazInvoiceTransportFreightModality"
          },
          "volumeQuantity": {
            "type": "integer",
            "description": "Quantidade de volumes transportados",
            "format": "int32",
            "nullable": true
          },
          "volumeNumeration": {
            "type": "string",
            "description": "Numeração dos volumes transportados",
            "nullable": true
          },
          "species": {
            "type": "string",
            "description": "Espécie dos volumes transportados",
            "nullable": true
          },
          "brand": {
            "type": "string",
            "description": "Marca",
            "nullable": true
          },
          "grossWeight": {
            "type": "number",
            "description": "Preso Bruto",
            "format": "double",
            "nullable": true
          },
          "netWeight": {
            "type": "number",
            "description": "Peso líquido",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Transportadora e dados de transporte da venda"
      },
      "OrderGetAllDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da Venda",
            "format": "uuid"
          },
          "transactionId": {
            "type": "string",
            "description": "Código da Transação",
            "nullable": true
          },
          "date": {
            "type": "string",
            "description": "Data da venda",
            "format": "date-time"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total da venda",
            "format": "double"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "profileType": {
            "$ref": "#/components/schemas/OrderProfileType"
          },
          "sourcePlatform": {
            "$ref": "#/components/schemas/PlatformType"
          }
        },
        "additionalProperties": false
      },
      "OrderGetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da Venda",
            "format": "uuid"
          },
          "transactionId": {
            "type": "string",
            "description": "Código da Transação",
            "nullable": true
          },
          "date": {
            "type": "string",
            "description": "Data da Venda",
            "format": "date-time"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total",
            "format": "double"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "sourcePlatform": {
            "$ref": "#/components/schemas/PlatformType"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemDto"
            },
            "description": "Items da venda",
            "nullable": true
          },
          "autoIssueMode": {
            "$ref": "#/components/schemas/OrderIssueInvoiceMode"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/OrderPaymentMethod"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderInvoiceDto"
            },
            "description": "Notas fiscais",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderInvoiceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da NF",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "model": {
            "$ref": "#/components/schemas/InvoiceModel"
          },
          "processingDetail": {
            "$ref": "#/components/schemas/InvoiceProcessingDetailDto"
          }
        },
        "additionalProperties": false
      },
      "OrderIssueInvoiceMode": {
        "enum": [
          "disabled",
          "immediately",
          "afterPayment",
          "afterWarrency"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>disabled</b>: Desativado (Manual)</li>\n<li><b>immediately</b>: Imediatamente (default)</li>\n<li><b>afterPayment</b>: Após o pagamento</li>\n<li><b>afterWarrency</b>: Após a garantia</li>\n</ul>\n"
      },
      "OrderIssueInvoicesDto": {
        "type": "object",
        "properties": {
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência para emissão das notas fiscais. Se não informada, utiliza a data original da venda.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderItemDto": {
        "required": [
          "amount",
          "price",
          "product",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Descrição",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantidade",
            "format": "double"
          },
          "price": {
            "type": "number",
            "description": "Preço unitário",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "Valor total",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "description": "Valor do desconto",
            "format": "double"
          },
          "freightAmount": {
            "type": "number",
            "description": "Valor do frete",
            "format": "double",
            "nullable": true
          },
          "product": {
            "$ref": "#/components/schemas/OrderProductDto"
          }
        },
        "additionalProperties": false
      },
      "OrderPaymentMethod": {
        "enum": [
          "billetBank",
          "creditCard",
          "debitCard",
          "pix",
          "paypal",
          "bankTransfer",
          "balanceWallets",
          "other",
          "cash"
        ],
        "type": "string",
        "description": "Forma de pagamento<p>Valores possíveis:</p>\n<ul>\n<li><b>billetBank</b>: Boleto</li>\n<li><b>creditCard</b>: Cartão de Crédito</li>\n<li><b>debitCard</b>: Cartão de Débito</li>\n<li><b>pix</b>: PIX</li>\n<li><b>paypal</b>: Paypal</li>\n<li><b>bankTransfer</b>: Transferência Bancária</li>\n<li><b>balanceWallets</b>: Saldo da Carteira</li>\n<li><b>other</b>: Outro</li>\n<li><b>cash</b>: Dinheiro</li>\n</ul>\n"
      },
      "OrderPostDto": {
        "required": [
          "amount",
          "date",
          "items"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "Código da Transação / Venda",
            "nullable": true
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total da venda",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "description": "Valor total de desconto",
            "format": "double"
          },
          "freightAmount": {
            "type": "number",
            "description": "Valor total de frete",
            "format": "double",
            "nullable": true
          },
          "freight": {
            "$ref": "#/components/schemas/OrderFreightDto"
          },
          "date": {
            "type": "string",
            "description": "Data da venda",
            "format": "date-time"
          },
          "warrantyDate": {
            "type": "string",
            "description": "Data da Garantia",
            "format": "date-time",
            "nullable": true
          },
          "sendEmailToCustomer": {
            "type": "boolean",
            "description": "Enviar e-mail para cliente",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "autoIssueMode": {
            "$ref": "#/components/schemas/OrderIssueInvoiceMode"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/OrderPaymentMethod"
          },
          "profileType": {
            "$ref": "#/components/schemas/OrderProfileType"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemDto"
            },
            "description": "Itens da venda"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostInvoiceDto"
            },
            "description": "Notas fiscais (Opcional). Informar somente quando necessário personalizar alguma informação da NF a ser gerada.",
            "nullable": true
          },
          "event": {
            "$ref": "#/components/schemas/OrderEventDto"
          }
        },
        "additionalProperties": false
      },
      "OrderProductDto": {
        "required": [
          "code",
          "name",
          "price"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Nome"
          },
          "code": {
            "minLength": 1,
            "type": "string",
            "description": "Código"
          },
          "price": {
            "type": "number",
            "description": "Preço",
            "format": "double"
          },
          "profile": {
            "$ref": "#/components/schemas/OwnerProfileType"
          },
          "invoiceModel": {
            "$ref": "#/components/schemas/ProductInvoiceModel"
          }
        },
        "additionalProperties": false
      },
      "OrderProfileType": {
        "enum": [
          "producer",
          "coproducer",
          "affiliate"
        ],
        "type": "string",
        "description": "Tipo do Perfil<p>Valores possíveis:</p>\n<ul>\n<li><b>producer</b>: Produtor</li>\n<li><b>coproducer</b>: Coprodutor</li>\n<li><b>affiliate</b>: Afiliado</li>\n</ul>\n"
      },
      "OrderPutStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          }
        },
        "additionalProperties": false
      },
      "OrderQueryInputDateType": {
        "enum": [
          "sale",
          "invoiceEffectiveDate",
          "invoiceAuthorization",
          "invoiceIssuedOn",
          "approvedDate"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>sale</b>: Data da venda</li>\n<li><b>invoiceEffectiveDate</b>: Data de competência da nota</li>\n<li><b>invoiceAuthorization</b>: Data de autorização da nota</li>\n<li><b>invoiceIssuedOn</b>: Data de emissão da nota</li>\n<li><b>approvedDate</b>: Data de aprovação</li>\n</ul>\n"
      },
      "OrderQueryInputInvoiceIssuer": {
        "enum": [
          "myCompany",
          "thirdParties"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>myCompany</b>: Emitida pela minha empresa</li>\n<li><b>thirdParties</b>: Emitida por terceiros</li>\n</ul>\n"
      },
      "OrderStatus": {
        "enum": [
          "created",
          "awaitingPayment",
          "approved",
          "refundRequested",
          "completed",
          "chargeback",
          "canceled",
          "refunded",
          "expired",
          "refused",
          "deleted"
        ],
        "type": "string",
        "description": "Situação da venda<p>Valores possíveis:</p>\n<ul>\n<li><b>created</b>: Criado</li>\n<li><b>awaitingPayment</b>: Aguardando pagamento</li>\n<li><b>approved</b>: Aprovado</li>\n<li><b>refundRequested</b>: Reembolso solicitado</li>\n<li><b>completed</b>: Concluído</li>\n<li><b>chargeback</b>: Chargeback</li>\n<li><b>canceled</b>: Cancelado</li>\n<li><b>refunded</b>: Reembolsado</li>\n<li><b>expired</b>: Vencido</li>\n<li><b>refused</b>: Recusado</li>\n<li><b>deleted</b>: Deletado</li>\n</ul>\n"
      },
      "OwnerProfileType": {
        "enum": [
          "producer",
          "coproducer",
          "affiliate"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>producer</b>: Produtor</li>\n<li><b>coproducer</b>: Coprodutor</li>\n<li><b>affiliate</b>: Afiliado</li>\n</ul>\n"
      },
      "PlatformType": {
        "enum": [
          "spedy",
          "hotmart",
          "monetizze",
          "eduzz",
          "braip",
          "shopify",
          "iugu",
          "pagarme",
          "kiwify",
          "mercadoPago",
          "yampi",
          "nuvemshop",
          "cartpanda",
          "stripe",
          "perfectPay",
          "evermart",
          "cyclopay",
          "greenn",
          "woocommerce",
          "afiliaPay",
          "blueticket",
          "abmex",
          "asaas",
          "doppus",
          "dooca",
          "vindi",
          "guru",
          "ticto",
          "eadPlataforma",
          "provi",
          "blitzPay",
          "payt",
          "eventiza",
          "pepper",
          "appMax",
          "voomp",
          "xgrow",
          "kirvano",
          "theMart",
          "hubla",
          "payPal",
          "tmb",
          "lastlink",
          "vega",
          "doppusV2",
          "cakto",
          "wix",
          "wBuy",
          "pepperV2",
          "neonPay",
          "assiny",
          "pagTrust",
          "wiapy",
          "onProfit",
          "edunext",
          "yampiV2",
          "yever",
          "tikTokShop",
          "luna",
          "bilion",
          "b4you",
          "vegaV2",
          "domPagamentos",
          "neofin",
          "pagBank",
          "lia",
          "yuno",
          "theMembers",
          "digistore24",
          "heroSpark",
          "woovi",
          "zouti",
          "eduzzV4",
          "stripeV2"
        ],
        "type": "string",
        "description": "Plataforma de venda integrada<p>Valores possíveis:</p>\n<ul>\n<li><b>spedy</b>: Spedy</li>\n<li><b>hotmart</b>: Hotmart</li>\n<li><b>monetizze</b>: Monetizze</li>\n<li><b>eduzz</b>: Eduzz</li>\n<li><b>braip</b>: Braip</li>\n<li><b>shopify</b>: Shopify</li>\n<li><b>iugu</b>: Iugu</li>\n<li><b>pagarme</b>: Pagar.me</li>\n<li><b>kiwify</b>: Kiwify</li>\n<li><b>mercadoPago</b>: Mercado Pago</li>\n<li><b>yampi</b>: Yampi</li>\n<li><b>nuvemshop</b>: Nuvemshop</li>\n<li><b>cartpanda</b>: Cartpanda</li>\n<li><b>stripe</b>: Stripe</li>\n<li><b>perfectPay</b>: PerfectPay</li>\n<li><b>evermart</b>: Evermart</li>\n<li><b>cyclopay</b>: Cyclopay</li>\n<li><b>greenn</b>: Greenn</li>\n<li><b>woocommerce</b>: WooCommerce</li>\n<li><b>afiliaPay</b>: AfiliaPay</li>\n<li><b>blueticket</b>: Blueticket</li>\n<li><b>abmex</b>: Abmex</li>\n<li><b>asaas</b>: Asaas</li>\n<li><b>doppus</b>: Doppus</li>\n<li><b>dooca</b>: Dooca</li>\n<li><b>vindi</b>: Vindi</li>\n<li><b>guru</b>: Guru</li>\n<li><b>ticto</b>: Ticto</li>\n<li><b>eADPlataforma</b>: EAD Plataforma</li>\n<li><b>provi</b>: Provi</li>\n<li><b>blitzPay</b>: BlitzPay</li>\n<li><b>payt</b>: Payt</li>\n<li><b>eventiza</b>: Eventiza</li>\n<li><b>pepper</b>: Pepper</li>\n<li><b>appMax</b>: AppMax</li>\n<li><b>voomp</b>: Voomp</li>\n<li><b>xgrow</b>: Xgrow</li>\n<li><b>kirvano</b>: Kirvano</li>\n<li><b>theMart</b>: The Mart</li>\n<li><b>hubla</b>: Hubla</li>\n<li><b>payPal</b>: PayPal</li>\n<li><b>tMB</b>: TMB</li>\n<li><b>lastlink</b>: Lastlink</li>\n<li><b>vega</b>: Vega</li>\n<li><b>doppusV2</b>: Doppus V2</li>\n<li><b>cakto</b>: Cakto</li>\n<li><b>wix</b>: Wix</li>\n<li><b>wBuy</b>: WBuy</li>\n<li><b>pepperV2</b>: Pepper V2</li>\n<li><b>neonPay</b>: NeonPay</li>\n<li><b>assiny</b>: Assiny</li>\n<li><b>pagTrust</b>: PagTrust</li>\n<li><b>wiapy</b>: Wiapy</li>\n<li><b>onProfit</b>: OnProfit</li>\n<li><b>edunext</b>: Edunext</li>\n<li><b>yampiV2</b>: Yampi V2</li>\n<li><b>yever</b>: Yever</li>\n<li><b>tikTokShop</b>: TikTok Shop</li>\n<li><b>luna</b>: Luna</li>\n<li><b>bilion</b>: Bilion</li>\n<li><b>b4you</b>: B4you</li>\n<li><b>vegaV2</b>: Vega V2</li>\n<li><b>domPagamentos</b>: Dom Pagamentos</li>\n<li><b>neofin</b>: Neofin</li>\n<li><b>pagBank</b>: PagBank</li>\n<li><b>lia</b>: Lia</li>\n<li><b>yuno</b>: Yuno</li>\n<li><b>theMembers</b>: The Members</li>\n<li><b>digistore24</b>: Digistore24</li>\n<li><b>heroSpark</b>: HeroSpark</li>\n<li><b>woovi</b>: Woovi</li>\n<li><b>zouti</b>: Zouti</li>\n<li><b>eduzzV4</b>: EduzzV4</li>\n<li><b>stripeV2</b>: StripeV2</li>\n</ul>\n"
      },
      "PostInvoiceDto": {
        "type": "object",
        "properties": {
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão",
            "format": "date-time",
            "nullable": true
          },
          "receiver": {
            "$ref": "#/components/schemas/InvoiceReceiverDto"
          },
          "additionalInformation": {
            "type": "string",
            "description": "Informações adicionais",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competênca",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "integer",
            "description": "Número",
            "format": "int64",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          }
        },
        "additionalProperties": false
      },
      "PrintingType": {
        "enum": [
          "none",
          "portrait",
          "landscape",
          "simplified",
          "consumerInvoice",
          "electronicMessage"
        ],
        "type": "string",
        "description": "Formato de impressão do DANFE<p>Valores possíveis:</p>\n<ul>\n<li><b>none</b>: Sem geração de DANFE</li>\n<li><b>portrait</b>: Retrato (orientação vertical)</li>\n<li><b>landscape</b>: Paisagem (orientação horizontal)</li>\n<li><b>simplified</b>: Simplificado</li>\n<li><b>consumerInvoice</b>: DANFE NFC-e (cupom fiscal eletrônico)</li>\n<li><b>electronicMessage</b>: Mensagem eletrônica</li>\n</ul>\n"
      },
      "ProductGetDto": {
        "required": [
          "name",
          "price"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string",
            "description": "Código",
            "nullable": true
          },
          "name": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string",
            "description": "Nome"
          },
          "price": {
            "type": "number",
            "description": "Preço",
            "format": "double"
          },
          "invoiceModel": {
            "$ref": "#/components/schemas/ProductInvoiceModel"
          },
          "warrantyDays": {
            "type": "integer",
            "description": "Dias de Garantia",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductInvoiceCorrectionLetterRequestDto": {
        "required": [
          "letter"
        ],
        "type": "object",
        "properties": {
          "letter": {
            "minLength": 1,
            "type": "string",
            "description": "Carta de Correção"
          }
        },
        "additionalProperties": false
      },
      "ProductInvoiceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da NF",
            "format": "uuid"
          },
          "integrationId": {
            "type": "string",
            "description": "ID de integração",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "model": {
            "$ref": "#/components/schemas/InvoiceModel"
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência",
            "format": "date-time",
            "nullable": true
          },
          "receiver": {
            "$ref": "#/components/schemas/InvoiceReceiverDto"
          },
          "company": {
            "$ref": "#/components/schemas/InvoiceCompanyDto"
          },
          "order": {
            "$ref": "#/components/schemas/InvoiceOrderDto"
          },
          "authorization": {
            "$ref": "#/components/schemas/InvoiceAuthorizationDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total da NF",
            "format": "double"
          },
          "number": {
            "type": "integer",
            "description": "Número",
            "format": "int64",
            "nullable": true
          },
          "processingDetail": {
            "$ref": "#/components/schemas/InvoiceProcessingDetailDto"
          },
          "accessKey": {
            "type": "string",
            "nullable": true
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "operationType": {
            "$ref": "#/components/schemas/InvoiceOperationType"
          },
          "printingType": {
            "$ref": "#/components/schemas/PrintingType"
          },
          "issueType": {
            "$ref": "#/components/schemas/InvoiceIssueType"
          },
          "purposeType": {
            "$ref": "#/components/schemas/SefazInvoicePurposeType"
          },
          "debitType": {
            "$ref": "#/components/schemas/SefazInvoiceDebitType"
          },
          "creditType": {
            "$ref": "#/components/schemas/SefazInvoiceCreditType"
          },
          "govPurchase": {
            "$ref": "#/components/schemas/SefazInvoiceGovPurchaseDto"
          },
          "govOperationType": {
            "$ref": "#/components/schemas/SefazInvoiceGovOperationType"
          }
        },
        "additionalProperties": false
      },
      "ProductInvoiceDtoPagedList": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pageCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductInvoiceDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductInvoiceModel": {
        "enum": [
          "productInvoice",
          "consumerInvoice",
          "serviceInvoice",
          "split"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>productInvoice</b>: NF-e</li>\n<li><b>consumerInvoice</b>: NFC-e</li>\n<li><b>serviceInvoice</b>: NFS-e</li>\n<li><b>split</b>: Split</li>\n</ul>\n"
      },
      "ProductPostDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 40,
            "minLength": 0,
            "type": "string",
            "description": "Código",
            "nullable": true
          },
          "name": {
            "maxLength": 120,
            "minLength": 0,
            "type": "string",
            "description": "Nome"
          },
          "price": {
            "type": "number",
            "description": "Preço",
            "format": "double",
            "nullable": true
          },
          "invoiceModel": {
            "$ref": "#/components/schemas/InvoiceModel"
          },
          "warrantyDays": {
            "type": "integer",
            "description": "Dias de Garantia",
            "format": "int32",
            "nullable": true
          },
          "serviceInvoiceSettings": {
            "$ref": "#/components/schemas/ProductServiceInvoiceSettingsDto"
          },
          "productInvoiceSettings": {
            "$ref": "#/components/schemas/ProductSefazInvoiceSettingsDto"
          }
        },
        "additionalProperties": false
      },
      "ProductSefazInvoiceSettingsDto": {
        "type": "object",
        "properties": {
          "gtinCode": {
            "type": "string",
            "description": "Código GTIN",
            "nullable": true
          },
          "cfopIn": {
            "type": "string",
            "description": "CFOP Entrada",
            "nullable": true
          },
          "cfopInterstate": {
            "type": "string",
            "description": "CFOP Interestadual (Não contribuinte)",
            "nullable": true
          },
          "cfopTaxpayerInterstate": {
            "type": "string",
            "description": "CFOP Interestadual (Contribuinte)",
            "nullable": true
          },
          "cfopInternational": {
            "type": "string",
            "description": "CFOP Internacional",
            "nullable": true
          },
          "cest": {
            "type": "string",
            "description": "CEST",
            "nullable": true
          },
          "ncm": {
            "type": "string",
            "description": "NCM",
            "nullable": true
          },
          "unitOfMeasurement": {
            "type": "string",
            "description": "Unidade de medida",
            "nullable": true
          },
          "taxUnitOfMeasurement": {
            "type": "string",
            "description": "Unidade de medida tributável",
            "nullable": true
          },
          "exportationTaxUnitOfMeasurement": {
            "type": "string",
            "description": "Unidade de medida tributável de exportação",
            "nullable": true
          },
          "additionalInformation": {
            "type": "string",
            "description": "Informações adicionais",
            "nullable": true
          },
          "fiscalDescription": {
            "type": "string",
            "description": "Descrição fiscal",
            "nullable": true
          },
          "useSpecificNumering": {
            "type": "boolean"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "nextNumber": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductServiceInvoiceSettingsDto": {
        "type": "object",
        "properties": {
          "fiscalDescription": {
            "maxLength": 250,
            "minLength": 0,
            "type": "string",
            "description": "Descrição fiscal do serviço",
            "nullable": true
          },
          "cityServiceCode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Código de tributação no município",
            "nullable": true
          },
          "federalServiceCode": {
            "type": "string",
            "description": "Item da Lista de Serviço (LC 116/03)",
            "nullable": true
          },
          "nationalTaxationCode": {
            "type": "string",
            "description": "Código de Tributação Nacional",
            "nullable": true
          },
          "cnaeCode": {
            "type": "string",
            "description": "Código CNAE",
            "nullable": true
          },
          "useSpecificNumering": {
            "type": "boolean",
            "description": "Código de tributação no município"
          },
          "series": {
            "type": "string",
            "nullable": true
          },
          "nextNumber": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "nextBatchNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "nbsCode": {
            "type": "string",
            "nullable": true
          },
          "simplesNacionalAnnex": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResultSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceBillingDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Número [nFat]",
            "nullable": true
          },
          "originalAmount": {
            "type": "number",
            "description": "Valor original [vOrig]",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "description": "Valor desconto [vDesc]",
            "format": "double"
          },
          "netAmount": {
            "type": "number",
            "description": "Valor líquido [vLiq]",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceBillingDuplicateDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Número da duplicata [nDup]",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "description": "Data de Vencimento [dVenc]",
            "format": "date-time"
          },
          "amount": {
            "type": "number",
            "description": "Valor da Duplicata [vDup]",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceCreditType": {
        "enum": [
          "finesAndInterest",
          "appropriation"
        ],
        "type": "string",
        "description": "Tipo de Nota de Crédito — NT 2025.002 Reforma Tributária<p>Valores possíveis:</p>\n<ul>\n<li><b>finesAndInterest</b>: Multa e juros</li>\n<li><b>appropriation</b>: Apropriação de crédito presumido de IBS sobre o saldo devedor na ZFM (art. 450, § 1º, LC 214/25)</li>\n</ul>\n"
      },
      "SefazInvoiceDebitType": {
        "enum": [
          "creditTransferToCooperatives",
          "creditReversalForExemptOrImmuneOutputs",
          "unprocessedInvoiceDebitInAssessment",
          "penaltyAndInterest",
          "creditTransferBySuccession",
          "advancePayment",
          "inventoryLoss"
        ],
        "type": "string",
        "description": "Tipo de Nota de Débito — NT 2025.002 Reforma Tributária<p>Valores possíveis:</p>\n<ul>\n<li><b>creditTransferToCooperatives</b>: Transferência de créditos para Cooperativas</li>\n<li><b>creditReversalForExemptOrImmuneOutputs</b>: Anulação de crédito por saídas imunes/isentas</li>\n<li><b>unprocessedInvoiceDebitInAssessment</b>: Débitos de notas fiscais não processadas na apuração</li>\n<li><b>penaltyAndInterest</b>: Multa e juros</li>\n<li><b>creditTransferBySuccession</b>: Transferência de crédito de sucessão</li>\n<li><b>advancePayment</b>: Pagamento antecipado</li>\n<li><b>inventoryLoss</b>: Perda em estoque</li>\n</ul>\n"
      },
      "SefazInvoiceDestinationType": {
        "enum": [
          "internal",
          "interstate",
          "international"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>internal</b>: Interna</li>\n<li><b>interstate</b>: Interestadual</li>\n<li><b>international</b>: Exterior</li>\n</ul>\n"
      },
      "SefazInvoiceDisablementEditingDto": {
        "required": [
          "finalNumber",
          "initialNumber",
          "reason",
          "series"
        ],
        "type": "object",
        "properties": {
          "initialNumber": {
            "minimum": 1,
            "type": "integer",
            "description": "Número inicial",
            "format": "int64"
          },
          "finalNumber": {
            "minimum": 1,
            "type": "integer",
            "description": "Número final",
            "format": "int64"
          },
          "series": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "Série",
            "format": "int32"
          },
          "reason": {
            "minLength": 15,
            "type": "string",
            "description": "Motivo"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceGovOperationType": {
        "enum": [
          "supply",
          "receipt"
        ],
        "type": "string",
        "description": "Tipo de operação com o ente governamental — NT 2025.002 Reforma Tributária<p>Valores possíveis:</p>\n<ul>\n<li><b>supply</b>: Fornecimento</li>\n<li><b>receipt</b>: Recebimento do pagamento, conforme fato gerador do IBS/CBS (Art. 10 § 2º)</li>\n</ul>\n"
      },
      "SefazInvoiceGovPurchaseDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/InvoiceGovernmentEntityType"
          },
          "rate": {
            "type": "number",
            "description": "Percentual de redução de alíquota em compra governamental [pRedutor]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemCofinsDto": {
        "type": "object",
        "properties": {
          "cst": {
            "type": "integer",
            "description": "Código de identificação da situação tributária [CST]",
            "format": "int32"
          },
          "baseTax": {
            "type": "number",
            "description": "base de cálculo do ICMS [vBC]",
            "format": "double"
          },
          "rate": {
            "type": "number",
            "description": "Alíquota da COFINS  [pCOFINS]",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "valor total da COFINS  [vCOFINS]",
            "format": "double"
          },
          "productQuantity": {
            "type": "number",
            "description": "Quantidade de base de cálculo de ICMS do produto [qBCProd]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Código [cProd]",
            "nullable": true
          },
          "gtinCode": {
            "type": "string",
            "description": "Código GTIN [cEAN]",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Descrição [xProd]",
            "nullable": true
          },
          "ncm": {
            "type": "string",
            "description": "NCM [NCM]",
            "nullable": true
          },
          "cest": {
            "type": "string",
            "description": "Código Especificador da Substituição Tributária [CEST]",
            "nullable": true
          },
          "cfop": {
            "type": "integer",
            "description": "Código Fiscal de Operações e Prestações [CFOP]",
            "format": "int32"
          },
          "unit": {
            "type": "string",
            "description": "Unidade [uCom]",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantidade [qCom]",
            "format": "double"
          },
          "unitAmount": {
            "type": "number",
            "description": "Valor Unitário [vUnCom]",
            "format": "double"
          },
          "totalAmount": {
            "type": "number",
            "description": "Valor total [vProd]",
            "format": "double"
          },
          "unitTax": {
            "type": "string",
            "description": "Unidade tributária [uTrib]",
            "nullable": true
          },
          "quantityTax": {
            "type": "number",
            "description": "Quantidade tributária [qTrib]",
            "format": "double"
          },
          "unitTaxAmount": {
            "type": "number",
            "description": "Valor Unitário de Tributação [vUnTrib]",
            "format": "double"
          },
          "freightAmount": {
            "type": "number",
            "description": "Valor do frete [vFrete]",
            "format": "double",
            "nullable": true
          },
          "insuranceAmount": {
            "type": "number",
            "description": "Valor do seguro [vSeg]",
            "format": "double",
            "nullable": true
          },
          "discountAmount": {
            "type": "number",
            "description": "Desconto [vDesc]",
            "format": "double",
            "nullable": true
          },
          "othersAmount": {
            "type": "number",
            "description": "Outros [vOutro]",
            "format": "double",
            "nullable": true
          },
          "makeupTotal": {
            "type": "boolean",
            "description": "Indica se valor do Item entra no valor total da NF [indTot]"
          },
          "numberOrderBuy": {
            "type": "string",
            "description": "Número do pedido de compra [xPed]",
            "nullable": true
          },
          "itemNumberOrderBuy": {
            "type": "integer",
            "description": "Número do item do pedido [nItemPed]",
            "format": "int32",
            "nullable": true
          },
          "taxBenefitCode": {
            "type": "string",
            "description": "Código de Benefício Fiscal [cBenef]",
            "nullable": true
          },
          "taxes": {
            "$ref": "#/components/schemas/SefazInvoiceItemTaxesDto"
          },
          "specificProduct": {
            "$ref": "#/components/schemas/SefazInvoiceItemSpecificProductDto"
          },
          "trackings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SefazInvoiceItemTrackingDto"
            },
            "description": "Rastreabilidade do produto por lote [rastro]",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemFuelDto": {
        "type": "object",
        "properties": {
          "anpCode": {
            "type": "string",
            "description": "Código do produto conforme ANP (Agência Nacional do Petróleo) [cProdANP]",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Descrição do produto conforme tabela ANP [descANP]",
            "nullable": true
          },
          "consumptionUF": {
            "$ref": "#/components/schemas/States"
          }
        },
        "additionalProperties": false,
        "description": "Informações específicas para combustíveis [comb]"
      },
      "SefazInvoiceItemIbsCbsDefDto": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "description": "Percentual do diferimento [pDif]",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Valor do Diferimento [vDif]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsDevTax": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsDevTaxDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Valor do tributo devolvido [vDevTrib]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsDto": {
        "type": "object",
        "properties": {
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária do IBS e CBS [CST]",
            "format": "int32"
          },
          "classification": {
            "type": "integer",
            "description": "Código de Classificação Tributária do IBS e CBS [cClassTrib]",
            "format": "int32"
          },
          "ibsAmount": {
            "type": "number",
            "description": "Valor do IBS [vIBS]",
            "format": "double",
            "nullable": true
          },
          "baseTax": {
            "type": "number",
            "description": "Base de cálculo do IBS e CBS [vBC]",
            "format": "double",
            "nullable": true
          },
          "ibsStateRate": {
            "type": "number",
            "description": "Alíquota do IBS de competência das UF [pIBSUF]",
            "format": "double",
            "nullable": true
          },
          "ibsStateDef": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDefDto"
          },
          "ibsStateDevTax": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDevTaxDto"
          },
          "ibsStateRed": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsRedDto"
          },
          "ibsStateAmount": {
            "type": "number",
            "description": "Valor do IBS de competência da UF [vIBSUF]",
            "format": "double",
            "nullable": true
          },
          "ibsCityRate": {
            "type": "number",
            "description": "Alíquota vigente do IBS do Município [pIBSMun]",
            "format": "double",
            "nullable": true
          },
          "ibsCityDef": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDefDto"
          },
          "ibsCityDevTax": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDevTax"
          },
          "ibsCityRed": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsRedDto"
          },
          "ibsCityAmount": {
            "type": "number",
            "description": "Valor do IBS de competência do Município [vIBSMun]",
            "format": "double",
            "nullable": true
          },
          "cbsRate": {
            "type": "number",
            "description": "Alíquota vigente da CBS [pCBS]",
            "format": "double",
            "nullable": true
          },
          "cbsDef": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDefDto"
          },
          "cbsDevTax": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDevTax"
          },
          "cbsRed": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsRedDto"
          },
          "cbsAmount": {
            "type": "number",
            "description": "Valor da CBS [vCBS]",
            "format": "double",
            "nullable": true
          },
          "regCst": {
            "type": "integer",
            "description": "Código de Situação Tributária do IBS e CBS [CSTReg]",
            "format": "int32"
          },
          "regClassification": {
            "type": "integer",
            "description": "Código de Classificação Tributária do IBS e CBS [cClassTribReg]",
            "format": "int32"
          },
          "regStateIbsRate": {
            "type": "number",
            "description": "Valor da alíquota do IBS da UF [pAliqEfetRegIBSUF]",
            "format": "double",
            "nullable": true
          },
          "regStateIbsAmount": {
            "type": "number",
            "description": "Valor do Tributo do IBS da UF [vTribRegIBSUF]",
            "format": "double",
            "nullable": true
          },
          "regCityIbsRate": {
            "type": "number",
            "description": "Valor da alíquota do IBS do Município [pAliqEfetRegIBSMun]",
            "format": "double",
            "nullable": true
          },
          "regCityIbsAmount": {
            "type": "number",
            "description": "Valor do Tributo do IBS do Município [vTribRegIBSMun]",
            "format": "double",
            "nullable": true
          },
          "regCbsRate": {
            "type": "number",
            "description": "Valor da alíquota da CBS [pAliqEfetRegCBS]",
            "format": "double",
            "nullable": true
          },
          "regCbsAmount": {
            "type": "number",
            "description": "Valor do Tributo da CBS [vTribRegCBS]",
            "format": "double",
            "nullable": true
          },
          "ibsPresCred": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsPresCredDto"
          },
          "cbsPresCred": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsPresCredDto"
          },
          "govPurchaseStateIbsRate": {
            "type": "number",
            "description": "Alíquota do IBS de competência do Estado [pAliqIBSUF]",
            "format": "double",
            "nullable": true
          },
          "govPurchaseStateIbsAmount": {
            "type": "number",
            "description": "Valor do Tributo do IBS da UF calculado [vTribIBSUF]",
            "format": "double",
            "nullable": true
          },
          "govPurchaseCityIbsRate": {
            "type": "number",
            "description": "Alíquota do IBS de competência do Municípo [pAliqIBSMun]",
            "format": "double",
            "nullable": true
          },
          "govPurchaseCityIbsAmount": {
            "type": "number",
            "description": "Valor do Tributo do IBS do Município calculado [vTribIBSMun]",
            "format": "double",
            "nullable": true
          },
          "govPurchaseCbsRate": {
            "type": "number",
            "description": "Alíquota da CBS [pAliqCBS]",
            "format": "double",
            "nullable": true
          },
          "govPurchaseCbsAmount": {
            "type": "number",
            "description": "Valor do Tributo da CBS calculado [vTribCBS]",
            "format": "double",
            "nullable": true
          },
          "singleStageIbsAmount": {
            "type": "number",
            "description": "Total de IBS Monofásico [vTotIBSMonoItem]",
            "format": "double",
            "nullable": true
          },
          "singleStageCbsAmount": {
            "type": "number",
            "description": "Total da CBS Monofásica [vTotCBSMonoItem]",
            "format": "double",
            "nullable": true
          },
          "singleStageStandard": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsSingleStageDto"
          },
          "singleStageReten": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsSingleStageDto"
          },
          "singleStageRet": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsSingleStageDto"
          },
          "singleStageDefIbsRate": {
            "type": "number",
            "description": "Percentual do diferimento do imposto monofásico [pDifIBS]",
            "format": "double",
            "nullable": true
          },
          "singleStageDefIbsAmount": {
            "type": "number",
            "description": "Valor do IBS monofásico diferido [vIBSMonoDif]",
            "format": "double",
            "nullable": true
          },
          "singleStageDefCbsRate": {
            "type": "number",
            "description": "Percentual do diferimento do imposto monofásico [pDifCBS]",
            "format": "double",
            "nullable": true
          },
          "singleStageDefCbsAmount": {
            "type": "number",
            "description": "Valor da CBS Monofásico diferida [vCBSMonoDif]",
            "format": "double",
            "nullable": true
          },
          "credTransferIbsAmount": {
            "type": "number",
            "description": "Valor do IBS a ser transferido [vIBS]",
            "format": "double",
            "nullable": true
          },
          "credTransferCbsAmount": {
            "type": "number",
            "description": "Valor da CBS a ser transferida [vCBS]",
            "format": "double",
            "nullable": true
          },
          "presCredIbsZfmType": {
            "$ref": "#/components/schemas/SefazInvoiceItemPresCredIbsZfm"
          },
          "presCredIbsZfmAmount": {
            "type": "number",
            "description": "Valor do crédito presumido calculado sobre o saldo devedor apurado [vCredPresIBSZFM]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsPresCredDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Código de Classificação do Crédito Presumido [cCredPres]",
            "format": "int32",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Percentual do Crédito Presumido [pCredPres]",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Valor do Crédito Presumido [vCredPres]",
            "format": "double",
            "nullable": true
          },
          "suspensiveAmount": {
            "type": "number",
            "description": "Valor do Crédito Presumido em condição suspensiva [vCredPresCondSus]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsRedDto": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "description": "Percentual da redução de alíquota do cClassTrib [pRedAliq]",
            "format": "double",
            "nullable": true
          },
          "effectiveRate": {
            "type": "number",
            "description": "Alíquota efetiva, após aplicação da redução de alíquota, incluindo o percentual de redução de alíquota em compra governamental, se houver [pAliqEfet]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIbsCbsSingleStageDto": {
        "type": "object",
        "properties": {
          "quantityTax": {
            "type": "number",
            "description": "Informar a BC quantidade conforme unidade de medida estabelecida na legislação para o produto [qBCMono]",
            "format": "double",
            "nullable": true
          },
          "ibsAdRemRate": {
            "type": "number",
            "description": "Alíquota ad rem do IBS [adRemIBS]",
            "format": "double",
            "nullable": true
          },
          "cbsAdRemRate": {
            "type": "number",
            "description": "Alíquota ad rem da CBS [adRemCBS]",
            "format": "double",
            "nullable": true
          },
          "ibsAmount": {
            "type": "number",
            "description": "Valor do IBS monofásico [vIBSMono]",
            "format": "double",
            "nullable": true
          },
          "cbsAmount": {
            "type": "number",
            "description": "Valor da CBS monofásico [vCBSMono]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIcmsDestinationDto": {
        "type": "object",
        "properties": {
          "destBaseTax": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "fcpAdicRate": {
            "type": "number",
            "description": "Fundo de Combate à Pobreza [pFCPUFDest]",
            "format": "double",
            "nullable": true
          },
          "internalOperationRate": {
            "type": "number",
            "description": "Valor do ICMS devido para a UF de destino [vpICMSUFDest]",
            "format": "double",
            "nullable": true
          },
          "destinationRate": {
            "type": "number",
            "description": "Alíquota de ICMS interestadual aplicável à operação [pICMSInter]",
            "format": "double",
            "nullable": true
          },
          "fcpDestinationAmount": {
            "type": "number",
            "description": "Valor do Fundo de Combate à Pobreza [vFCPUFDest]",
            "format": "double",
            "nullable": true
          },
          "destinationAmount": {
            "type": "number",
            "description": "Valor do ICMS devido para a UF de destino [vICMSUFDest]",
            "format": "double",
            "nullable": true
          },
          "issuerStateAmount": {
            "type": "number",
            "description": "valor do ICMS devido para a UF do remetente da mercadoria [vICMSUFRemet]",
            "format": "double",
            "nullable": true
          },
          "fcpBaseTax": {
            "type": "number",
            "description": "Base de cálculo do Fundo de Combate à Pobreza [vBCFCPUFDest]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIcmsDto": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "integer",
            "description": "Origem do produto [orig]",
            "format": "int32"
          },
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária [CST]",
            "format": "int32",
            "nullable": true
          },
          "csosn": {
            "type": "integer",
            "description": "Código de Situação da Operação no Simples Nacional [CSOSN]",
            "format": "int32",
            "nullable": true
          },
          "baseTaxModality": {
            "type": "integer",
            "description": "Modalidade de Base de Cálculo do ICMS [modBC]",
            "format": "int32"
          },
          "baseTax": {
            "type": "number",
            "description": "Base de Cálculo do ICMS [vBC]",
            "format": "double"
          },
          "baseTaxSt": {
            "type": "number",
            "description": "Valor da BC do ICMS ST [vBCST]",
            "format": "double",
            "nullable": true
          },
          "baseTaxStModality": {
            "type": "integer",
            "description": "Modalidade de determinação da BC do ICMS ST [modBCST]\r\n0 - Preço tabelado ou máximo  sugerido\r\n1 - Lista Negativa (valor)\r\n2 - Lista Positiva (valor)\r\n3 - Lista Neutra (valor)\r\n4 - Margem Valor Agregado (%)\r\n5 - Pauta (valor)\r\n6 - Valor da Operação",
            "format": "int32",
            "nullable": true
          },
          "baseTaxStReduction": {
            "type": "number",
            "description": "Percentual da Redução de BC do ICMS ST [pRedBCST]",
            "format": "double",
            "nullable": true
          },
          "baseTaxStAmount": {
            "type": "number",
            "format": "double"
          },
          "baseTaxReduction": {
            "type": "number",
            "description": "Percentual da Redução de BC [pRedBC]",
            "format": "double"
          },
          "stRate": {
            "type": "number",
            "description": "Alíquota do imposto do ICMS ST [pICMSST]",
            "format": "double"
          },
          "stAmount": {
            "type": "number",
            "description": "Valor do ICMS ST [vICMSST]",
            "format": "double",
            "nullable": true
          },
          "stMarginAmount": {
            "type": "number",
            "description": "Percentual da margem de valor Adicionado do ICMS ST [pMVAST]",
            "format": "double",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Alíquota do ICMS [pICMS]",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "Valor do ICMS [vICMS]",
            "format": "double"
          },
          "reductionRate": {
            "type": "number",
            "format": "double"
          },
          "snCreditRate": {
            "type": "number",
            "description": "Alíquota aplicável de cálculo do crédito (Simples Nacional) [pCredSN]",
            "format": "double"
          },
          "snCreditAmount": {
            "type": "number",
            "description": "Valor crédito do ICMS que pode ser aproveitado nos termos do art. 23 da LC 123 Simples Nacional [vCredICMSSN]",
            "format": "double"
          },
          "stRetentionAmount": {
            "type": "number",
            "description": "Valor do ICMS ST retido [vICMSSTRet]",
            "format": "double",
            "nullable": true
          },
          "baseStRetentionAmount": {
            "type": "number",
            "description": "Valor da BC do ICMS ST retido [vBCSTRet]",
            "format": "double",
            "nullable": true
          },
          "taxOperationBaseRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ufSt": {
            "$ref": "#/components/schemas/States"
          },
          "stReason": {
            "type": "string",
            "nullable": true
          },
          "amountOperation": {
            "type": "number",
            "description": "Valor do ICMS da Operação [vICMSOp]",
            "format": "double",
            "nullable": true
          },
          "defermentRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "baseDeferred": {
            "type": "number",
            "description": "Valor do ICMS Diferido [vICMSDif]",
            "format": "double",
            "nullable": true
          },
          "exemptAmount": {
            "type": "number",
            "description": "Valor ICMS Desonerado [vICMSDeson]",
            "format": "double",
            "nullable": true
          },
          "exemptReason": {
            "type": "integer",
            "description": "Motivo Desoneração ICMS [motDesICMS] \r\n1 - Táxi\r\n2 - Deficiente Físico\r\n3 - Produtor Agropecuário\r\n4 - Frotista/Locadora\r\n5 - Diplomático/Consular\r\n6 - Utilitários e Motocicletas da Amazônia Ocidental e Áreas de Livre Comércio (Resolução 714/88 e 790/94 – CONTRAN e suas alterações)\r\n7 - SUFRAMA\r\n8 - Venda a Orgãos Publicos\r\n9 - Outros\r\n10 - Deficiente Condutor (Convênio ICMS 38/12)\r\n11 - Deficiente não Condutor (Convênio ICMS 38/12)\r\n12 - Fomento agropecuário\r\n16 - Olimpíadas Rio 2016\r\n90 - Solicitado pelo Fisco",
            "format": "int32"
          },
          "fcpRate": {
            "type": "number",
            "description": "Percentual do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza [pFCP]",
            "format": "double",
            "nullable": true
          },
          "fcpAmount": {
            "type": "number",
            "description": "Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza [vFCP]",
            "format": "double",
            "nullable": true
          },
          "fcpStRate": {
            "type": "number",
            "description": "Percentual do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária [pFCPST]",
            "format": "double",
            "nullable": true
          },
          "fcpStAmount": {
            "type": "number",
            "description": "Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária [vFCPST]",
            "format": "double",
            "nullable": true
          },
          "fcpStRetRate": {
            "type": "number",
            "description": "Percentual do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária [pFCPSTRet]",
            "format": "double",
            "nullable": true
          },
          "fcpStRetAmount": {
            "type": "number",
            "description": "Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária [vFCPSTRet]",
            "format": "double",
            "nullable": true
          },
          "baseTaxFcpStAmount": {
            "type": "number",
            "description": "Informar o valor da Base de Cálculo do FCP [vBCFCPST]",
            "format": "double",
            "nullable": true
          },
          "substituteAmount": {
            "type": "number",
            "description": "Valor do ICMS próprio do Substituto [vICMSSubstituto]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIiDto": {
        "type": "object",
        "properties": {
          "baseTax": {
            "type": "number",
            "description": "Valor BC do Imposto de Importação (vBC)",
            "format": "double"
          },
          "customsExpenditureAmount": {
            "type": "number",
            "description": "Valor despesas aduaneiras (vDespAdu)",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "Valor Imposto de Importação (vII)",
            "format": "double"
          },
          "iofAmount": {
            "type": "number",
            "description": "Valor Imposto sobre Operações Financeiras (vIOF)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIpiDto": {
        "type": "object",
        "properties": {
          "classification": {
            "type": "string",
            "description": "Classe de enquadramento do IPI para Cigarros e Bebidas [clEnq]",
            "nullable": true
          },
          "producerFederalTaxNumber": {
            "type": "string",
            "description": "CNPJ (Cadastro Nacional da Pessoa Jurídica) do fabricante do produto [CNPJProd]",
            "nullable": true
          },
          "stampCode": {
            "type": "string",
            "description": "Código do selo de controle IPI [cSelo]",
            "nullable": true
          },
          "stampQuantity": {
            "type": "integer",
            "description": "Quantidade de selo de controle [qSelo]",
            "format": "int32"
          },
          "classificationCode": {
            "type": "string",
            "description": "Código de enquadramento legal do IPI [cEnq]",
            "nullable": true
          },
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária [CST]",
            "format": "int32"
          },
          "baseTax": {
            "type": "number",
            "description": "Base de Cálculo do ICMS [vBC]",
            "format": "double"
          },
          "rate": {
            "type": "number",
            "description": "Alíquota do IPI [pIPI]",
            "format": "double"
          },
          "unitQuantity": {
            "type": "number",
            "description": "Quantidade de unidades do produto [qUnid]",
            "format": "double",
            "nullable": true
          },
          "unitAmount": {
            "type": "number",
            "description": "Valor unitário do produto [vUnid]",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Valor total do IPI  [vIPI]",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemIsDto": {
        "type": "object",
        "properties": {
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária do Imposto Seletivo [CSTIS]",
            "format": "int32"
          },
          "classification": {
            "type": "integer",
            "description": "Código de Classificação Tributária do Imposto Seletivo [cClassTribIS]",
            "format": "int32"
          },
          "baseTax": {
            "type": "number",
            "description": "Valor da Base de Cálculo do Imposto Seletivo [vBCIS]",
            "format": "double",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Alíquota do Imposto Seletivo [pIS]",
            "format": "double",
            "nullable": true
          },
          "specificRate": {
            "type": "number",
            "description": "Alíquota específica por unidade de medida apropriada [pISEspec]",
            "format": "double",
            "nullable": true
          },
          "unitTax": {
            "type": "string",
            "description": "Unidade de Medida Tributável [uTrib]",
            "nullable": true
          },
          "quantityTax": {
            "type": "number",
            "description": "Quantidade Tributável [qTrib]",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Valor do Imposto Seletivo [vIS]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemMedicationDto": {
        "type": "object",
        "properties": {
          "anvisaCode": {
            "type": "string",
            "description": "Numero ANVISA. Informar o número do código de registro do medicamento na ANVISA ou o literal \"ISENTO\". [cProdANVISA]",
            "nullable": true
          },
          "exemptionReason": {
            "type": "string",
            "description": "Motivo da isenção da ANVISA — preencher quando AnvisaCode = \"ISENTO\" [xMotivoIsencao]",
            "nullable": true
          },
          "maxConsumerPrice": {
            "type": "number",
            "description": "Preço Máximo Consumidor [vPMC]",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Detalhamento específico para medicamentos e matérias-primas farmacêuticas [med]"
      },
      "SefazInvoiceItemPisDto": {
        "type": "object",
        "properties": {
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária [CST]",
            "format": "int32"
          },
          "baseTax": {
            "type": "number",
            "description": "Base de cálculo do ICMS [vBC]",
            "format": "double"
          },
          "rate": {
            "type": "number",
            "description": "Valor total do PIS [pPIS]",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "Programa de Integração Social [vPIS]",
            "format": "double"
          },
          "productQuantity": {
            "type": "number",
            "description": "Quantidade de base de cálculo do ICMS do produto [qBCProd]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemPresCredIbsZfm": {
        "enum": [
          "none",
          "finalGoods",
          "capitalGoods",
          "intermediateGoods",
          "technologyGoods"
        ],
        "type": "string",
        "description": "Crédito Presumido de IBS na Zona Franca de Manaus<p>Valores possíveis:</p>\n<ul>\n<li><b>none</b>: Sem crédito presumido</li>\n<li><b>finalGoods</b>: Bens de consumo final (55%)</li>\n<li><b>capitalGoods</b>: Bens de capital (75%)</li>\n<li><b>intermediateGoods</b>: Bens intermediários (90,25%)</li>\n<li><b>technologyGoods</b>: Bens de informática e outros definidos em legislação (100%)</li>\n</ul>\n"
      },
      "SefazInvoiceItemSpecificProductDto": {
        "type": "object",
        "properties": {
          "fuel": {
            "$ref": "#/components/schemas/SefazInvoiceItemFuelDto"
          },
          "vehicle": {
            "$ref": "#/components/schemas/SefazInvoiceItemVehicleDto"
          },
          "medication": {
            "$ref": "#/components/schemas/SefazInvoiceItemMedicationDto"
          }
        },
        "additionalProperties": false,
        "description": "Informações de produto específico da NF-e"
      },
      "SefazInvoiceItemTaxesDto": {
        "type": "object",
        "properties": {
          "totalTax": {
            "type": "number",
            "description": "Valor total aproximado dos tributos [vTotTrib]",
            "format": "double"
          },
          "icms": {
            "$ref": "#/components/schemas/SefazInvoiceItemIcmsDto"
          },
          "ipi": {
            "$ref": "#/components/schemas/SefazInvoiceItemIpiDto"
          },
          "ii": {
            "$ref": "#/components/schemas/SefazInvoiceItemIiDto"
          },
          "pis": {
            "$ref": "#/components/schemas/SefazInvoiceItemPisDto"
          },
          "cofins": {
            "$ref": "#/components/schemas/SefazInvoiceItemCofinsDto"
          },
          "icmsDestination": {
            "$ref": "#/components/schemas/SefazInvoiceItemIcmsDestinationDto"
          },
          "is": {
            "$ref": "#/components/schemas/SefazInvoiceItemIsDto"
          },
          "ibsCbs": {
            "$ref": "#/components/schemas/SefazInvoiceItemIbsCbsDto"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceItemTrackingDto": {
        "type": "object",
        "properties": {
          "batchNumber": {
            "type": "string",
            "description": "Número do lote [nLote]",
            "nullable": true
          },
          "batchQuantity": {
            "type": "number",
            "description": "Quantidade do lote [qLote]",
            "format": "double"
          },
          "manufacturingDate": {
            "type": "string",
            "description": "Data de fabricação [dFab]",
            "format": "date-time"
          },
          "expirationDate": {
            "type": "string",
            "description": "Data de validade [dVal]",
            "format": "date-time"
          },
          "aggregationCode": {
            "type": "string",
            "description": "Código de agregação [cAgreg]",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Rastreabilidade do produto por lote [rastro]"
      },
      "SefazInvoiceItemVehicleCondition": {
        "enum": [
          "finished",
          "unfinished",
          "semiFinished"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>finished</b>: Acabado</li>\n<li><b>unfinished</b>: Inacabado</li>\n<li><b>semiFinished</b>: Semi-acabado</li>\n</ul>\n"
      },
      "SefazInvoiceItemVehicleDto": {
        "type": "object",
        "properties": {
          "operationType": {
            "$ref": "#/components/schemas/SefazInvoiceItemVehicleOperationType"
          },
          "chassis": {
            "type": "string",
            "description": "Número do chassi do veículo [chassi]",
            "nullable": true
          },
          "colorCode": {
            "type": "string",
            "description": "Código da cor do veículo [cCor]",
            "nullable": true
          },
          "colorDescription": {
            "type": "string",
            "description": "Descrição da cor do veículo [xCor]",
            "nullable": true
          },
          "power": {
            "type": "string",
            "description": "Potência do motor (CV) [pot]",
            "nullable": true
          },
          "cylinderCapacity": {
            "type": "string",
            "description": "Cilindrada do motor [cilin]",
            "nullable": true
          },
          "netWeight": {
            "type": "string",
            "description": "Peso líquido do veículo (kg) [pesoL]",
            "nullable": true
          },
          "grossWeight": {
            "type": "string",
            "description": "Peso bruto do veículo (kg) [pesoB]",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "description": "Número de série do veículo [nSerie]",
            "nullable": true
          },
          "fuelType": {
            "type": "string",
            "description": "Tipo de combustível utilizado pelo veículo [tpComb]",
            "nullable": true
          },
          "engineNumber": {
            "type": "string",
            "description": "Número do motor [nMotor]",
            "nullable": true
          },
          "maxTractionCapacity": {
            "type": "string",
            "description": "Capacidade máxima de tração (kg) [CMT]",
            "nullable": true
          },
          "distanceType": {
            "type": "string",
            "description": "Tipo de distância entre eixos [dist]",
            "nullable": true
          },
          "modelYear": {
            "type": "integer",
            "description": "Ano do modelo do veículo [anoMod]",
            "format": "int32"
          },
          "manufactureYear": {
            "type": "integer",
            "description": "Ano de fabricação do veículo [anoFab]",
            "format": "int32"
          },
          "paintType": {
            "type": "string",
            "description": "Tipo de pintura do veículo [tpPint]",
            "nullable": true
          },
          "vehicleType": {
            "type": "string",
            "description": "Tipo de veículo conforme tabela SEFAZ [tpVeic]",
            "nullable": true
          },
          "vehicleSpecies": {
            "type": "integer",
            "description": "Espécie do veículo [espVeic]",
            "format": "int32"
          },
          "vinCondition": {
            "$ref": "#/components/schemas/SefazInvoiceItemVehicleVinCondition"
          },
          "condition": {
            "$ref": "#/components/schemas/SefazInvoiceItemVehicleCondition"
          },
          "modelCode": {
            "type": "string",
            "description": "Código do modelo do veículo [cMod]",
            "nullable": true
          },
          "denatranColorCode": {
            "type": "string",
            "description": "Código da cor conforme DENATRAN [cCorDENATRAN]",
            "nullable": true
          },
          "seats": {
            "type": "integer",
            "description": "Lotação máxima de passageiros [lota]",
            "format": "int32"
          },
          "restrictionType": {
            "$ref": "#/components/schemas/SefazInvoiceItemVehicleRestrictionType"
          }
        },
        "additionalProperties": false,
        "description": "Informações específicas para veículos [veicProd]"
      },
      "SefazInvoiceItemVehicleOperationType": {
        "enum": [
          "others",
          "dealershipSale",
          "directBillingToFinalConsumer",
          "directSaleToLargeConsumers"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>others</b>: Outros</li>\n<li><b>dealershipSale</b>: Venda concessionária</li>\n<li><b>directBillingToFinalConsumer</b>: Faturamento direto para consumidor final</li>\n<li><b>directSaleToLargeConsumers</b>: Venda direta para grandes consumidores (frotista, governo, ...)</li>\n</ul>\n"
      },
      "SefazInvoiceItemVehicleRestrictionType": {
        "enum": [
          "none",
          "fiduciaryLien",
          "leasing",
          "retentionOfTitle",
          "vehiclePledge",
          "other"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>none</b>: Não há</li>\n<li><b>fiduciaryLien</b>: Alienação Fiduciária</li>\n<li><b>leasing</b>: Arrendamento Mercantil</li>\n<li><b>retentionOfTitle</b>: Reserva de Domínio</li>\n<li><b>vehiclePledge</b>: Penhor de Veículos</li>\n<li><b>other</b>: Outras</li>\n</ul>\n"
      },
      "SefazInvoiceItemVehicleVinCondition": {
        "enum": [
          "normal",
          "rescheduled"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>normal</b>: Normal</li>\n<li><b>rescheduled</b>: Remarcado</li>\n</ul>\n"
      },
      "SefazInvoicePaymentDetailCardDto": {
        "type": "object",
        "properties": {
          "federalTaxNumber": {
            "type": "string",
            "description": "Cadastro Nacional da Pessoa Jurídica [CNPJ]",
            "nullable": true
          },
          "flag": {
            "$ref": "#/components/schemas/SefazInvoicePaymentDetailCardFlag"
          },
          "authorizationCode": {
            "type": "string",
            "description": "Número de Autorização [cAut]",
            "nullable": true
          },
          "isIntegratedPayment": {
            "type": "boolean",
            "description": "Tipo de integração [tpIntegra]"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoicePaymentDetailCardFlag": {
        "enum": [
          "visa",
          "masterCard",
          "americanExpress",
          "sorocred",
          "dinersClub",
          "elo",
          "hipercard",
          "aura",
          "cabal",
          "others"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>visa</b>: Visa</li>\n<li><b>masterCard</b>: Mastercard</li>\n<li><b>americanExpress</b>: American Express</li>\n<li><b>sorocred</b>: Sorocred</li>\n<li><b>dinersClub</b>: Diners Club</li>\n<li><b>elo</b>: Elo</li>\n<li><b>hipercard</b>: Hipercard</li>\n<li><b>aura</b>: Aura</li>\n<li><b>cabal</b>: Cabal</li>\n<li><b>others</b>: Outros</li>\n</ul>\n"
      },
      "SefazInvoicePaymentDto": {
        "required": [
          "method"
        ],
        "type": "object",
        "properties": {
          "method": {
            "$ref": "#/components/schemas/SefazInvoicePaymentMethod"
          },
          "amount": {
            "type": "number",
            "description": "Valor do Pagamento [vPag]",
            "format": "double"
          },
          "card": {
            "$ref": "#/components/schemas/SefazInvoicePaymentDetailCardDto"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoicePaymentMethod": {
        "enum": [
          "money",
          "check",
          "creditCard",
          "debitCard",
          "storeCredit",
          "foodVoucher",
          "mealVoucher",
          "giftVoucher",
          "fuelVoucher",
          "commercialDuplicate",
          "billetBanking",
          "bankDeposit",
          "dynamicPix",
          "bankTransfer",
          "fidelityProgram",
          "pix",
          "noPayment",
          "other"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>money</b>: Dinheiro</li>\n<li><b>check</b>: Cheque</li>\n<li><b>creditCard</b>: Cartão de crédito</li>\n<li><b>debitCard</b>: Cartão de débito</li>\n<li><b>storeCredit</b>: Crédito na loja</li>\n<li><b>foodVoucher</b>: Vale alimentação</li>\n<li><b>mealVoucher</b>: Vale refeição</li>\n<li><b>giftVoucher</b>: Vale presente</li>\n<li><b>fuelVoucher</b>: Vale combustível</li>\n<li><b>commercialDuplicate</b>: Duplicata mercantil</li>\n<li><b>billetBanking</b>: Boleto bancário</li>\n<li><b>bankDeposit</b>: Depósito bancário</li>\n<li><b>dynamicPix</b>: Pix dinâmico</li>\n<li><b>bankTransfer</b>: Transferência bancária</li>\n<li><b>fidelityProgram</b>: Programa de fidelidade</li>\n<li><b>pix</b>: Pix</li>\n<li><b>noPayment</b>: Sem pagamento</li>\n<li><b>other</b>: Outro</li>\n</ul>\n"
      },
      "SefazInvoicePresenceType": {
        "enum": [
          "none",
          "presence",
          "internet",
          "telephone",
          "delivery",
          "othersNonPresenceOperation"
        ],
        "type": "string",
        "description": "Indicador de presença do comprador no estabelecimento comercial<p>Valores possíveis:</p>\n<ul>\n<li><b>none</b>: Não se aplica (ex: NF-e complementar ou de ajuste)</li>\n<li><b>presence</b>: Operação presencial</li>\n<li><b>internet</b>: Operação não presencial via Internet</li>\n<li><b>telephone</b>: Operação não presencial via teleatendimento</li>\n<li><b>delivery</b>: Entrega em domicílio (NFC-e)</li>\n<li><b>othersNonPresenceOperation</b>: Operação não presencial — outros</li>\n</ul>\n"
      },
      "SefazInvoicePurposeType": {
        "enum": [
          "normal",
          "complement",
          "adjustment",
          "devolution",
          "credit",
          "debit"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>normal</b>: Normal</li>\n<li><b>complement</b>: Complemento</li>\n<li><b>adjustment</b>: Ajustamento</li>\n<li><b>devolution</b>: Devolução</li>\n<li><b>credit</b>: Crédito</li>\n<li><b>debit</b>: Débito</li>\n</ul>\n"
      },
      "SefazInvoiceReceiverDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "CPF / CNPJ / Doc Estrangeiro",
            "nullable": true
          },
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição estadual",
            "nullable": true
          },
          "cityTaxNumber": {
            "type": "string",
            "description": "Inscrição municipal",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "E-mail",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Telefone",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceReferencedDocumentDto": {
        "type": "object",
        "properties": {
          "accessKey": {
            "type": "string",
            "description": "Chave de acesso [id]",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTotalDto": {
        "type": "object",
        "properties": {
          "invoiceAmount": {
            "type": "number",
            "description": "Valor total da NF-e [vNF]",
            "format": "double"
          },
          "pisAmount": {
            "type": "number",
            "description": "Valor total PIS [vPIS]",
            "format": "double"
          },
          "cofinsAmount": {
            "type": "number",
            "description": "Valor total COFINS [vCOFINS]",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "description": "Valor desconto [vDesc]",
            "format": "double"
          },
          "othersAmount": {
            "type": "number",
            "description": "Valor outro [vOutro]",
            "format": "double"
          },
          "totalTax": {
            "type": "number",
            "description": "Total do valor aproximado de tributos [vTotTrib]",
            "format": "double"
          },
          "ipiAmount": {
            "type": "number",
            "description": "Valor total do IPI [vIPI]",
            "format": "double"
          },
          "importTaxAmount": {
            "type": "number",
            "description": "Valor total do Imposto de Importação [vII]",
            "format": "double"
          },
          "productAmount": {
            "type": "number",
            "description": "Valor total dos produtos e serviços [vProd]",
            "format": "double"
          },
          "freightAmount": {
            "type": "number",
            "description": "Valor total do frete [vFrete]",
            "format": "double"
          },
          "insuranceAmount": {
            "type": "number",
            "description": "Valor total do seguro [vSeg]",
            "format": "double"
          },
          "icmsBaseTax": {
            "type": "number",
            "description": "Base de cálculo do ICMS [vBC]",
            "format": "double"
          },
          "icmsAmount": {
            "type": "number",
            "description": "Valor total do ICMS [vICMS]",
            "format": "double"
          },
          "icmsStBaseTax": {
            "type": "number",
            "description": "Base de Cálculo do ICMS Substituição Tributária [vBCST]",
            "format": "double"
          },
          "icmsStAmount": {
            "type": "number",
            "description": "Valor total do ICMS ST [vST]",
            "format": "double"
          },
          "icmsExemptAmount": {
            "type": "number",
            "description": "Valor total do ICMS desonerado [vICMSDeson]",
            "format": "double"
          },
          "fcpStRetAmount": {
            "type": "number",
            "description": "Valor total FCP retido anteriormente por ST [vFCPSTRet]",
            "format": "double"
          },
          "fcpStAmount": {
            "type": "number",
            "description": "Valor Total FCP retido por ST [vFCPST]",
            "format": "double"
          },
          "fcpAmount": {
            "type": "number",
            "description": "Valor total do FCP [vFCP]",
            "format": "double"
          },
          "ipiReturnedAmount": {
            "type": "number",
            "description": "Valor total IPI devolvido [vIPIDevol]",
            "format": "double",
            "nullable": true
          },
          "icmsSenderAmount": {
            "type": "number",
            "description": "Valor total ICMS Interestadual UF Remetente [vICMSUFRemet]",
            "format": "double",
            "nullable": true
          },
          "icmsDestinationAmount": {
            "type": "number",
            "description": "Valor total ICMS Interestadual UF Destino [vICMSUFDest]",
            "format": "double",
            "nullable": true
          },
          "fcpDestinationAmount": {
            "type": "number",
            "description": "Valor total FCP UF Destino [vFCPUFDest]",
            "format": "double",
            "nullable": true
          },
          "isAmount": {
            "type": "number",
            "description": "Total do imposto seletivo [vIS]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsCbsBaseTax": {
            "type": "number",
            "description": "Valor total da BC do IBS e da CBS [vBCIBSCBS]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsStateDefAmount": {
            "type": "number",
            "description": "Valor total do diferimento [vDif]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsStateDevTaxAmount": {
            "type": "number",
            "description": "Valor total de devolução de tributos [vDevTrib]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsStateAmount": {
            "type": "number",
            "description": "Valor total do IBS da UF [vIBSUF]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsCityDefAmount": {
            "type": "number",
            "description": "Valor total do diferimento [vDif]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsCityDevTaxAmount": {
            "type": "number",
            "description": "Valor total de devolução de tributos [vDevTrib]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsCityAmount": {
            "type": "number",
            "description": "Valor total do IBS do Município [vIBSMun]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsAmount": {
            "type": "number",
            "description": "Valor total do IBS [vIBS]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsPresCredAmount": {
            "type": "number",
            "description": "Valor total do crédito presumido [vCredPres]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsPresCredSuspensiveAmount": {
            "type": "number",
            "description": "Valor total do crédito presumido em condição suspensiva [vCredPresCondSus]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsDefAmount": {
            "type": "number",
            "description": "Valor total do diferimento [vDif]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsDevTaxAmount": {
            "type": "number",
            "description": "Valor total de devolução de tributos [vDevTrib]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsAmount": {
            "type": "number",
            "description": "Valor total da CBS [vCBS]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsPresCredAmount": {
            "type": "number",
            "description": "Valor total do crédito presumido [vCredPres]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsPresCredSuspensiveAmount": {
            "type": "number",
            "description": "Valor total do crédito presumido em condição suspensiva [vCredPresCondSus]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsSingleStageStandardAmount": {
            "type": "number",
            "description": "Total do IBS monofásico [vIBSMono]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsSingleStageStandardAmount": {
            "type": "number",
            "description": "Total da CBS monofásico [vCBSMono]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsSingleStageRetenAmount": {
            "type": "number",
            "description": "Total do IBS monofásico sujeito a retenção [vIBSMonoReten]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsSingleStageRetenAmount": {
            "type": "number",
            "description": "Total da CBS monofásico sujeita a retenção [vCBSMonoReten]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsSingleStageRetAmount": {
            "type": "number",
            "description": "Total do IBS monofásico retido anteriormente [vIBSMonoRet]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "cbsSingleStageRetAmount": {
            "type": "number",
            "description": "Total da CBS monofásico retida anteriormente [vCBSMonoRet]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          },
          "ibsCbsIsAmount": {
            "type": "number",
            "description": "Valor total da NF-e com IBS / CBS / IS [vNFTot]\r\n\r\nNT 2025.002 - Reforma Tributária",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportCarrierDto": {
        "type": "object",
        "properties": {
          "stateTaxNumber": {
            "type": "string",
            "description": "Inscrição Estadual do Transportador [IE]",
            "nullable": true
          },
          "transportRetention": {
            "type": "string",
            "description": "Grupo de Retenção do ICMS do transporte",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Razão Social ou Nome [xNome]",
            "nullable": true
          },
          "federalTaxNumber": {
            "type": "string",
            "description": "Cadastro Nacional da Pessoa Jurídica [CNPJ]",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportDto": {
        "type": "object",
        "properties": {
          "freightModality": {
            "$ref": "#/components/schemas/SefazInvoiceTransportFreightModality"
          },
          "carrier": {
            "$ref": "#/components/schemas/SefazInvoiceTransportCarrierDto"
          },
          "trailer": {
            "$ref": "#/components/schemas/SefazInvoiceTransportTrailerDto"
          },
          "volume": {
            "$ref": "#/components/schemas/SefazInvoiceTransportVolumeDto"
          },
          "vehicle": {
            "$ref": "#/components/schemas/SefazInvoiceTransportVehicleDto"
          },
          "icmsRetention": {
            "$ref": "#/components/schemas/SefazInvoiceTransportIcmsRetentionDto"
          },
          "wagon": {
            "type": "string",
            "description": "Identificação do Vagão [vagao]",
            "nullable": true
          },
          "ferry": {
            "type": "string",
            "description": "Identificação da Balsa [balsa]",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportFreightModality": {
        "enum": [
          "byIssuer",
          "byReceiver",
          "byThirdParties",
          "free"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>byIssuer</b>: Contratação do Frete por conta do Remetente (CIF)</li>\n<li><b>byReceiver</b>: Contratação do Frete por conta do Destinatário (FOB)</li>\n<li><b>byThirdParties</b>: Contratação do Frete por conta de Terceiros</li>\n<li><b>free</b>: Sem Ocorrência de Transporte</li>\n</ul>\n"
      },
      "SefazInvoiceTransportIcmsRetentionDto": {
        "type": "object",
        "properties": {
          "serviceAmount": {
            "type": "number",
            "description": "Valor do Serviço [vServ]",
            "format": "double"
          },
          "baseTax": {
            "type": "number",
            "description": "Base de cálculo para a retenção do ICMS sobre o transporte",
            "format": "double"
          },
          "rate": {
            "type": "number",
            "description": "Alíquota da Retenção [pICMSRet]",
            "format": "double"
          },
          "amount": {
            "type": "number",
            "description": "Valor total do ICMS retido sobre o transporte",
            "format": "double"
          },
          "cfop": {
            "type": "string",
            "description": "CFOP de Serviço de Transporte [CFOP]",
            "nullable": true
          },
          "cityGeneratorFactCode": {
            "type": "integer",
            "description": "Código do Municipio de ocorrencia do fato gerador do ICMS do Transpote [cMunFG]",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportTrailerDto": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Placa [placa]",
            "nullable": true
          },
          "state": {
            "$ref": "#/components/schemas/States"
          },
          "rntc": {
            "type": "string",
            "description": "Registro Nacional de Transportadores Rodoviários de Carga [RNTC]",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportVehicleDto": {
        "type": "object",
        "properties": {
          "plate": {
            "type": "string",
            "description": "Placa [placa]",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Estado [UF]",
            "nullable": true
          },
          "rntc": {
            "type": "string",
            "description": "Registro Nacional de Transportadores Rodoviários de Carga [RNTC]",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SefazInvoiceTransportVolumeDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "Quantidade de volumes transportados [qVol]",
            "format": "int32"
          },
          "species": {
            "type": "string",
            "description": "Espécie dos volumes transportados [esp]",
            "nullable": true
          },
          "brand": {
            "type": "string",
            "description": "Marca [marca]",
            "nullable": true
          },
          "volumeNumeration": {
            "type": "string",
            "description": "Numeração dos volumes transportados [nVol]",
            "nullable": true
          },
          "netWeight": {
            "type": "number",
            "description": "Peso líquido [pesoL]",
            "format": "double",
            "nullable": true
          },
          "grossWeight": {
            "type": "number",
            "description": "Preso Bruto [pesoB]",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SemfazEndpointProviderSettingsAuthentication": {
        "enum": [
          "certificate",
          "userName",
          "token"
        ],
        "type": "string",
        "description": "Tipo de autenticação utilizado pelo provedor junto à prefeitura<p>Valores possíveis:</p>\n<ul>\n<li><b>certificate</b>: Certificado digital A1</li>\n<li><b>userName</b>: Usuário e senha cadastrados na prefeitura</li>\n<li><b>token</b>: Token de acesso fornecido pela prefeitura</li>\n</ul>\n"
      },
      "ServiceInvoiceApproximateTaxRatesDto": {
        "type": "object",
        "properties": {
          "municipalRate": {
            "type": "number",
            "description": "Alíquota Municipal",
            "format": "double",
            "nullable": true
          },
          "stateRate": {
            "type": "number",
            "description": "Alíquota Estadual",
            "format": "double",
            "nullable": true
          },
          "federalRate": {
            "type": "number",
            "description": "Alíquota Federal",
            "format": "double",
            "nullable": true
          },
          "simplesNacionalRate": {
            "type": "number",
            "description": "Alíquota do Simples Nacional (Apenas p/ Ambiente Nacional)",
            "format": "double",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Fonte da Tributação",
            "nullable": true
          },
          "mode": {
            "$ref": "#/components/schemas/CompanySettingsApproximateTaxesMode"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceApproximateTaxesDto": {
        "type": "object",
        "properties": {
          "federalAmount": {
            "type": "number",
            "description": "Valor total Federal",
            "format": "double",
            "nullable": true
          },
          "federalRate": {
            "type": "number",
            "description": "Alíquota Federal",
            "format": "double",
            "nullable": true
          },
          "municipalRate": {
            "type": "number",
            "description": "Alíquota Municipal",
            "format": "double",
            "nullable": true
          },
          "municipalAmount": {
            "type": "number",
            "description": "Valor total municipal",
            "format": "double",
            "nullable": true
          },
          "stateAmount": {
            "type": "number",
            "description": "Valor total estadual",
            "format": "double",
            "nullable": true
          },
          "stateRate": {
            "type": "number",
            "description": "Alíquota Estadual",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Valor total da tributação",
            "format": "double",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Alíquota total",
            "format": "double",
            "nullable": true
          },
          "version": {
            "type": "string",
            "description": "Versão",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Fonte da tributação",
            "nullable": true
          },
          "mode": {
            "$ref": "#/components/schemas/CompanySettingsApproximateTaxesMode"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceConstructionDto": {
        "type": "object",
        "properties": {
          "fiscalPropertyTaxNumber": {
            "type": "string",
            "description": "Inscrição imobiliária fiscal",
            "nullable": true
          },
          "constructionCode": {
            "type": "string",
            "description": "Número de identificação da obra",
            "nullable": true
          },
          "cibCode": {
            "type": "string",
            "description": "Código do Cadastro Imobiliário Brasileiro - CIB",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID da NF",
            "format": "uuid"
          },
          "integrationId": {
            "type": "string",
            "description": "ID de integração",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "model": {
            "$ref": "#/components/schemas/InvoiceModel"
          },
          "environmentType": {
            "$ref": "#/components/schemas/EnvironmentType"
          },
          "issuedOn": {
            "type": "string",
            "description": "Data de emissão",
            "format": "date-time",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Data de competência",
            "format": "date-time",
            "nullable": true
          },
          "receiver": {
            "$ref": "#/components/schemas/InvoiceReceiverDto"
          },
          "company": {
            "$ref": "#/components/schemas/InvoiceCompanyDto"
          },
          "order": {
            "$ref": "#/components/schemas/InvoiceOrderDto"
          },
          "authorization": {
            "$ref": "#/components/schemas/InvoiceAuthorizationDto"
          },
          "amount": {
            "type": "number",
            "description": "Valor total da NF",
            "format": "double"
          },
          "number": {
            "type": "integer",
            "description": "Número",
            "format": "int64",
            "nullable": true
          },
          "processingDetail": {
            "$ref": "#/components/schemas/InvoiceProcessingDetailDto"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/ServiceInvoiceTotalDto"
          },
          "rps": {
            "$ref": "#/components/schemas/ServiceInvoiceRpsDto"
          },
          "location": {
            "$ref": "#/components/schemas/CitySimpleDto"
          },
          "ibsCbs": {
            "$ref": "#/components/schemas/ServiceInvoiceIbsCbsDto"
          },
          "nbsCode": {
            "type": "string",
            "nullable": true
          },
          "nationalTaxationCode": {
            "type": "string",
            "nullable": true
          },
          "batchNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "approximateTaxes": {
            "$ref": "#/components/schemas/ServiceInvoiceApproximateTaxesDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceDtoPagedList": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pageCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasNext": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceInvoiceDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceEventDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Nome do evento",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Data de início da atividade de evento",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "description": "Data de fim da atividade de evento",
            "format": "date-time"
          },
          "identifier": {
            "type": "string",
            "description": "Identificação da Atividade de Evento",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceIbsCbsDto": {
        "type": "object",
        "properties": {
          "cst": {
            "type": "integer",
            "description": "Código de Situação Tributária do IBS e CBS",
            "format": "int32",
            "nullable": true
          },
          "classification": {
            "type": "integer",
            "description": "Código de Classificação Tributária do IBS e CBS",
            "format": "int32",
            "nullable": true
          },
          "operationIndicatorCode": {
            "type": "string",
            "description": "Código indicador da operação de fornecimento",
            "nullable": true
          },
          "isPersonalUse": {
            "type": "boolean",
            "description": "Indica operação de uso ou consumo pessoal"
          },
          "operationType": {
            "$ref": "#/components/schemas/InvoiceIbsCbsOperationType"
          },
          "governmentEntityType": {
            "$ref": "#/components/schemas/InvoiceGovernmentEntityType"
          },
          "property": {
            "$ref": "#/components/schemas/ServiceInvoiceIbsCbsPropertyDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceIbsCbsPropertyDto": {
        "type": "object",
        "properties": {
          "fiscalPropertyTaxNumber": {
            "type": "string",
            "description": "Inscrição imobiliária fiscal",
            "nullable": true
          },
          "cibCode": {
            "type": "string",
            "description": "Código do Cadastro Imobiliário Brasileiro - CIB",
            "nullable": true
          },
          "address": {
            "$ref": "#/components/schemas/AddressCreateDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceLocation": {
        "enum": [
          "companyMunicipality",
          "customerMunicipality",
          "serviceProvisionMunicipality"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>companyMunicipality</b>: No município da empresa</li>\n<li><b>customerMunicipality</b>: No município do cliente</li>\n<li><b>serviceProvisionMunicipality</b>: No município de prestação do serviço</li>\n</ul>\n"
      },
      "ServiceInvoiceMunicipalBenefit": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ServiceInvoiceMunicipalBenefitType"
          },
          "identification": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceMunicipalBenefitType": {
        "enum": [
          "exemption",
          "reductionOfTaxBasePercentage",
          "reductionOfTaxBaseAmount",
          "differentiatedRate"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>exemption</b>: Isenção</li>\n<li><b>reductionOfTaxBasePercentage</b>: Redução da base de cálculo em percentual (ppBM)</li>\n<li><b>reductionOfTaxBaseAmount</b>: Redução da base de cálculo em valor monetário (vInfoBM)</li>\n<li><b>differentiatedRate</b>: Alíquota diferenciada (aliqDifBM)</li>\n</ul>\n"
      },
      "ServiceInvoiceNationalDto": {
        "type": "object",
        "properties": {
          "municipalBenefit": {
            "$ref": "#/components/schemas/ServiceInvoiceMunicipalBenefit"
          },
          "construction": {
            "$ref": "#/components/schemas/ServiceInvoiceConstructionDto"
          },
          "event": {
            "$ref": "#/components/schemas/ServiceInvoiceEventDto"
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceRpsDto": {
        "type": "object",
        "properties": {
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "series": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ServiceInvoiceTaxationType": {
        "enum": [
          "taxationInMunicipality",
          "taxationOutsideMunicipality",
          "exemption",
          "immune",
          "suspendedByCourt",
          "suspendedByAdministrativeProcedure",
          "exportation",
          "nonIncidence"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>taxationInMunicipality</b>: Tributado no Município / Exigível / Operação tributável</li>\n<li><b>taxationOutsideMunicipality</b>: Tributado em outro município / Não incidência</li>\n<li><b>exemption</b>: Isento</li>\n<li><b>immune</b>: Imune</li>\n<li><b>suspendedByCourt</b>: Suspenso por Decisão Judicial</li>\n<li><b>suspendedByAdministrativeProcedure</b>: Suspenso por Decisão Administrativa</li>\n<li><b>exportation</b>: Exportação</li>\n<li><b>nonIncidence</b>: Não incidência</li>\n</ul>\n"
      },
      "ServiceInvoiceTotalDto": {
        "required": [
          "invoiceAmount"
        ],
        "type": "object",
        "properties": {
          "invoiceAmount": {
            "type": "number",
            "description": "Valor total da NF-e",
            "format": "double"
          },
          "netAmount": {
            "type": "number",
            "description": "Valor líquido",
            "format": "double"
          },
          "issBaseTax": {
            "type": "number",
            "description": "Base de cálculo do ISS",
            "format": "double",
            "nullable": true
          },
          "irRate": {
            "type": "number",
            "description": "Alíquota do IR",
            "format": "double",
            "nullable": true
          },
          "csllRate": {
            "type": "number",
            "description": "Alíquota do CSLL",
            "format": "double",
            "nullable": true
          },
          "pisRate": {
            "type": "number",
            "description": "Alíquota do PIS",
            "format": "double",
            "nullable": true
          },
          "cofinsRate": {
            "type": "number",
            "description": "Alíquota do COFINS",
            "format": "double",
            "nullable": true
          },
          "inssRate": {
            "type": "number",
            "description": "Alíquota do INSS",
            "format": "double",
            "nullable": true
          },
          "issRate": {
            "type": "number",
            "description": "Alíquota do ISS",
            "format": "double",
            "nullable": true
          },
          "issAmount": {
            "type": "number",
            "description": "Valor do ISS",
            "format": "double",
            "nullable": true
          },
          "discountUnconditionedAmount": {
            "type": "number",
            "description": "Valor total do desconto incondicionado",
            "format": "double",
            "nullable": true
          },
          "discountConditionedAmount": {
            "type": "number",
            "description": "Valor total do desconto condicionado",
            "format": "double",
            "nullable": true
          },
          "irAmount": {
            "type": "number",
            "description": "Valor do IR",
            "format": "double",
            "nullable": true
          },
          "pisCofinsBaseTax": {
            "type": "number",
            "description": "Base de cálculo do Pis/Cofins",
            "format": "double",
            "nullable": true
          },
          "pisAmount": {
            "type": "number",
            "description": "Valor do PIS",
            "format": "double",
            "nullable": true
          },
          "cofinsAmount": {
            "type": "number",
            "description": "Valor do COFINS",
            "format": "double",
            "nullable": true
          },
          "inssAmount": {
            "type": "number",
            "description": "Valor do INSS",
            "format": "double",
            "nullable": true
          },
          "csllAmount": {
            "type": "number",
            "description": "Valor do CSLL",
            "format": "double",
            "nullable": true
          },
          "othersAmount": {
            "type": "number",
            "description": "Valor de outros tributos",
            "format": "double",
            "nullable": true
          },
          "deductionsAmount": {
            "type": "number",
            "description": "Valor das deduções",
            "format": "double",
            "nullable": true
          },
          "irWithheld": {
            "type": "boolean",
            "description": "IR retido",
            "nullable": true
          },
          "issWithheld": {
            "type": "boolean",
            "description": "ISS retido",
            "nullable": true
          },
          "cofinsWithheld": {
            "type": "boolean",
            "description": "COFINS retido",
            "nullable": true
          },
          "inssWithheld": {
            "type": "boolean",
            "description": "INSS retido",
            "nullable": true
          },
          "csllWithheld": {
            "type": "boolean",
            "description": "CSLL retido",
            "nullable": true
          },
          "pisWithheld": {
            "type": "boolean",
            "description": "PIS retido",
            "nullable": true
          },
          "ibsStateRate": {
            "type": "number",
            "description": "Alíquota do IBS de competência da UF",
            "format": "double",
            "nullable": true
          },
          "ibsCityRate": {
            "type": "number",
            "description": "Alíquota vigente do IBS do Município",
            "format": "double",
            "nullable": true
          },
          "cbsRate": {
            "type": "number",
            "description": "Alíquota vigente da CBS",
            "format": "double",
            "nullable": true
          },
          "ibsCbsBaseTax": {
            "type": "number",
            "description": "Base de cálculo do IBS e CBS",
            "format": "double",
            "nullable": true
          },
          "ibsStateAmount": {
            "type": "number",
            "description": "Valor do IBS de competência da UF",
            "format": "double",
            "nullable": true
          },
          "ibsCityAmount": {
            "type": "number",
            "description": "Valor do IBS de competência do Município",
            "format": "double",
            "nullable": true
          },
          "ibsAmount": {
            "type": "number",
            "description": "Valor do IBS",
            "format": "double",
            "nullable": true
          },
          "cbsAmount": {
            "type": "number",
            "description": "Valor da CBS",
            "format": "double",
            "nullable": true
          },
          "receivedAmount": {
            "type": "number",
            "description": "Valor total recebido pelo serviço prestado",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SimplesNacionalTaxRegime": {
        "enum": [
          "federalAndMunicipalBySimplesNacional",
          "federalBySimplesAndIssqnByNfse",
          "federalAndMunicipalByNfse"
        ],
        "type": "string",
        "description": "Regime de Apuração dos Tributos do Simples Nacional<p>Valores possíveis:</p>\n<ul>\n<li><b>federalAndMunicipalBySimplesNacional</b>: Regime de apuração dos tributos federais e municipal pelo Simples Nacional</li>\n<li><b>federalBySimplesAndIssqnByNfse</b>: Regime de apuração dos tributos federais pelo Simples Nacional e o ISSQN pela NFS-e conforme legislação municipal</li>\n<li><b>federalAndMunicipalByNfse</b>: Regime de apuração dos tributos federais e municipal pela NFS-e conforme legislações federal e municipal</li>\n</ul>\n"
      },
      "SpecialTaxRegime": {
        "enum": [
          "municipalMicroenterprise",
          "estimate",
          "societyOfProfessionals",
          "cooperative",
          "individualMicroenterprise",
          "microenterpriseAndSmallBusiness",
          "noSpecialRegime",
          "others"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>municipalMicroenterprise</b>: 1 – Microempresa Municipal</li>\n<li><b>estimate</b>: 2 – Estimativa</li>\n<li><b>societyOfProfessionals</b>: 3 – Sociedade de Profissionais</li>\n<li><b>cooperative</b>: 4 – Cooperativa</li>\n<li><b>individualMicroenterprise</b>: 5 – Microempresário Individual (MEI)</li>\n<li><b>microenterpriseAndSmallBusiness</b>: 6 – Microempresário e Empresa de Pequeno Porte (ME EPP)</li>\n<li><b>noSpecialRegime</b>: 7 - Sem Regime Especial</li>\n<li><b>others</b>: 8 - Outros</li>\n</ul>\n"
      },
      "States": {
        "enum": [
          "ro",
          "ac",
          "am",
          "rr",
          "pa",
          "ap",
          "to",
          "ma",
          "pi",
          "ce",
          "rn",
          "pb",
          "pe",
          "al",
          "se",
          "ba",
          "mg",
          "es",
          "rj",
          "sp",
          "pr",
          "sc",
          "rs",
          "ms",
          "mt",
          "go",
          "df",
          "an",
          "ex"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>rO</b>: Rondônia</li>\n<li><b>aC</b>: Acre</li>\n<li><b>aM</b>: Amazonas</li>\n<li><b>rR</b>: Roraima</li>\n<li><b>pA</b>: Pará</li>\n<li><b>aP</b>: Amapá</li>\n<li><b>tO</b>: Tocantins</li>\n<li><b>mA</b>: Maranhão</li>\n<li><b>pI</b>: Piauí</li>\n<li><b>cE</b>: Ceará</li>\n<li><b>rN</b>: Rio Grande do Norte</li>\n<li><b>pB</b>: Paraíba</li>\n<li><b>pE</b>: Pernambuco</li>\n<li><b>aL</b>: Alagoas</li>\n<li><b>sE</b>: Sergipe</li>\n<li><b>bA</b>: Bahia</li>\n<li><b>mG</b>: Minas Gerais</li>\n<li><b>eS</b>: Espírito Santo</li>\n<li><b>rJ</b>: Rio de Janeiro</li>\n<li><b>sP</b>: São Paulo</li>\n<li><b>pR</b>: Paraná</li>\n<li><b>sC</b>: Santa Catarina</li>\n<li><b>rS</b>: Rio Grande do Sul</li>\n<li><b>mS</b>: Mato Grosso do Sul</li>\n<li><b>mT</b>: Mato Grosso</li>\n<li><b>gO</b>: Goiás</li>\n<li><b>dF</b>: Distrito Federal</li>\n<li><b>aN</b>: Ambiente Nacional</li>\n<li><b>eX</b>: Exterior</li>\n</ul>\n"
      },
      "StringStringValuesKeyValuePair": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "SystemEnableConcurrencyDto": {
        "type": "object",
        "properties": {
          "all": {
            "type": "boolean"
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SystemSettingsUpdateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TaxRegime": {
        "enum": [
          "simplesNacional",
          "simplesNacionalExcessoSublimite",
          "regimeNormal",
          "simplesNacionalMEI"
        ],
        "type": "string",
        "description": "<p>Valores possíveis:</p>\n<ul>\n<li><b>simplesNacional</b>: Simples Nacional</li>\n<li><b>simplesNacionalExcessoSublimite</b>: Simples Nacional — Excesso de sublimite de receita bruta</li>\n<li><b>regimeNormal</b>: Regime Normal (Lucro Presumido ou Lucro Real)</li>\n<li><b>simplesNacionalMEI</b>: Simples Nacional — MEI</li>\n</ul>\n"
      },
      "WebhookDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event": {
            "type": "string",
            "description": "Evento configurado",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "URL que receberá o HTTP POST com o payload do evento",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Indica se o webhook está ativo"
          }
        },
        "additionalProperties": false
      },
      "WebhookEditingDto": {
        "required": [
          "event",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event": {
            "maxLength": 80,
            "minLength": 0,
            "type": "string",
            "description": "Evento que irá disparar o webhook.\r\nValores aceitos: `invoice.status_changed`, `invoice.authorized`, `invoice.rejected`, `invoice.canceled`.\r\nO evento `invoice.status_changed` cobre qualquer alteração de status da nota e é suficiente para a maioria dos casos."
          },
          "url": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string",
            "description": "URL que receberá o HTTP POST com o payload do evento"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Authorization By X-Api-Key inside request's header",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "x-tagGroups": [
    {
      "name": "Referência da API",
      "tags": [
        "Empresas",
        "Vendas",
        "Clientes",
        "Produtos",
        "NF-e",
        "NFC-e (Beta)",
        "NFS-e",
        "Webhooks"
      ]
    }
  ]
}