{
 "components": {
  "parameters": {
   "Apos": {
    "description": "Cursor: proximo_cursor da página anterior.",
    "in": "query",
    "name": "apos",
    "schema": {
     "type": "string"
    }
   },
   "IdempotencyKey": {
    "description": "Repetir a mesma chave em 24 h devolve a mesma resposta; com outro corpo, 409 IDEMPOTENCIA_CONFLITO.",
    "in": "header",
    "name": "Idempotency-Key",
    "required": false,
    "schema": {
     "maxLength": 255,
     "type": "string"
    }
   },
   "Limite": {
    "in": "query",
    "name": "limite",
    "schema": {
     "default": 25,
     "maximum": 100,
     "minimum": 1,
     "type": "integer"
    }
   }
  },
  "responses": {
   "Problema": {
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problema"
      }
     }
    },
    "description": "Erro no formato RFC 9457"
   }
  },
  "schemas": {
   "Documento": {
    "properties": {
     "ambiente": {
      "description": "",
      "type": "string"
     },
     "arquivos": {
      "properties": {
       "pdf": {
        "description": "",
        "type": "string"
       },
       "xml": {
        "description": "",
        "type": "string"
       }
      },
      "type": "object"
     },
     "autorizacao": {
      "properties": {
       "cstat": {
        "description": "",
        "type": "string"
       },
       "data_hora": {
        "description": "",
        "type": "string"
       },
       "protocolo": {
        "description": "",
        "type": "string"
       },
       "xmotivo": {
        "description": "",
        "type": "string"
       }
      },
      "type": "object"
     },
     "chave_acesso": {
      "description": "",
      "type": "string"
     },
     "emitente_id": {
      "description": "",
      "type": "string"
     },
     "id": {
      "description": "",
      "type": "string"
     },
     "numero": {
      "type": "integer"
     },
     "numero_fiscal": {
      "description": "",
      "type": "string"
     },
     "referencia_externa": {
      "description": "",
      "type": "string"
     },
     "rejeicao": {
      "properties": {
       "cstat": {
        "description": "",
        "type": "string"
       },
       "erros": {
        "items": {
         "type": "object"
        },
        "type": "array"
       },
       "explicacao": {
        "description": "",
        "type": "string"
       },
       "sugestao": {
        "description": "",
        "type": "string"
       },
       "xmotivo": {
        "description": "",
        "type": "string"
       }
      },
      "type": "object"
     },
     "serie": {
      "type": "integer"
     },
     "status": {
      "description": "processando, autorizado, rejeitado, denegado, cancelado, substituido, erro",
      "type": "string"
     },
     "tipo": {
      "description": "nfse, nfe, nfce",
      "type": "string"
     },
     "valores": {
      "properties": {
       "total": {
        "description": "",
        "type": "string"
       },
       "tributos": {
        "type": "object"
       }
      },
      "type": "object"
     }
    },
    "type": "object"
   },
   "Emissao": {
    "properties": {
     "ambiente": {
      "description": "simulacao, homologacao ou producao (padrão pela chave e pelo certificado)",
      "type": "string"
     },
     "emissao": {
      "properties": {
       "contingencia": {
        "type": "object"
       },
       "finalidade": {
        "description": "",
        "type": "string"
       },
       "natureza_operacao": {
        "description": "NF-e/NFC-e",
        "type": "string"
       },
       "presenca": {
        "description": "",
        "type": "string"
       },
       "serie": {
        "type": "integer"
       }
      },
      "type": "object"
     },
     "emitente_id": {
      "description": "Emitente",
      "type": "string"
     },
     "iss": {
      "properties": {
       "aliquota": {
        "description": "",
        "type": "string"
       },
       "retencao": {
        "description": "nao_retido, tomador, intermediario",
        "type": "string"
       }
      },
      "type": "object"
     },
     "itens": {
      "description": "NF-e/NFC-e: codigo, descricao, ncm, cfop, quantidade, valor_unitario, tributos{icms,ipi,pis,cofins,ibs_cbs,difal}, perfil_tributario_id",
      "items": {
       "type": "object"
      },
      "type": "array"
     },
     "notificacao": {
      "properties": {
       "emails_extras": {
        "items": {
         "type": "string"
        },
        "type": "array"
       },
       "enviar_email": {
        "type": "boolean"
       }
      },
      "type": "object"
     },
     "pagamentos": {
      "items": {
       "properties": {
        "meio": {
         "description": "dinheiro, pix, cartao_credito…",
         "type": "string"
        },
        "valor": {
         "description": "",
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     },
     "participantes": {
      "properties": {
       "destinatario": {
        "description": "{id} | {codigo_interno} | {dados: {...}}",
        "type": "object"
       }
      },
      "type": "object"
     },
     "referencia_externa": {
      "description": "Sua referência; repetir com o mesmo conteúdo devolve o mesmo documento",
      "type": "string"
     },
     "servico": {
      "properties": {
       "codigo_tributacao_nacional": {
        "description": "6 dígitos",
        "type": "string"
       },
       "descricao": {
        "description": "",
        "type": "string"
       },
       "nbs": {
        "description": "9 dígitos",
        "type": "string"
       }
      },
      "type": "object"
     },
     "simulacao": {
      "properties": {
       "cenario": {
        "description": "autorizar, rejeitar:\u003ccStat\u003e, denegar, indisponivel, atraso:\u003cs\u003e",
        "type": "string"
       }
      },
      "type": "object"
     },
     "sincrono": {
      "description": "Espera até 30 s pela autorização",
      "type": "boolean"
     },
     "tomador": {
      "description": "NFS-e: participante tomador",
      "type": "object"
     },
     "valores": {
      "properties": {
       "servico": {
        "description": "NFS-e: valor do serviço",
        "type": "string"
       }
      },
      "type": "object"
     }
    },
    "required": [
     "emitente_id"
    ],
    "type": "object"
   },
   "Emitente": {
    "properties": {
     "aliquota_iss_padrao": {
      "description": "NFS-e",
      "type": "string"
     },
     "codigo_tributacao_nacional_padrao": {
      "description": "NFS-e",
      "type": "string"
     },
     "cpf_cnpj": {
      "description": "CNPJ (pode ser alfanumérico) ou CPF",
      "type": "string"
     },
     "endereco": {
      "properties": {
       "bairro": {
        "description": "",
        "type": "string"
       },
       "cep": {
        "description": "",
        "type": "string"
       },
       "logradouro": {
        "description": "",
        "type": "string"
       },
       "municipio_ibge": {
        "description": "7 dígitos",
        "type": "string"
       },
       "numero": {
        "description": "",
        "type": "string"
       },
       "uf": {
        "description": "",
        "type": "string"
       }
      },
      "type": "object"
     },
     "inscricao_estadual": {
      "description": "Só dígitos ou ISENTO",
      "type": "string"
     },
     "inscricao_municipal": {
      "description": "",
      "type": "string"
     },
     "nome_fantasia": {
      "description": "",
      "type": "string"
     },
     "perfil_tributario_padrao_id": {
      "description": "NF-e/NFC-e",
      "type": "string"
     },
     "razao_social": {
      "description": "",
      "type": "string"
     },
     "regime_tributario": {
      "description": "simples, simples_excesso, mei ou normal",
      "type": "string"
     }
    },
    "required": [
     "cpf_cnpj",
     "razao_social"
    ],
    "type": "object"
   },
   "Evento": {
    "properties": {
     "chave_substituta": {
      "description": "NFC-e",
      "type": "string"
     },
     "correcao": {
      "description": "Carta de correção",
      "type": "string"
     },
     "justificativa": {
      "description": "15 a 255 caracteres",
      "type": "string"
     },
     "motivo": {
      "description": "NFS-e: erro_emissao, servico_nao_prestado, outros",
      "type": "string"
     },
     "tipo": {
      "description": "cancelamento, carta_correcao, cancelamento_substituicao",
      "type": "string"
     }
    },
    "required": [
     "tipo"
    ],
    "type": "object"
   },
   "Lista": {
    "properties": {
     "dados": {
      "items": {
       "type": "object"
      },
      "type": "array"
     },
     "proximo_cursor": {
      "description": "Use em ?apos= para a próxima página; vazio no fim",
      "type": "string"
     }
    },
    "required": [
     "dados"
    ],
    "type": "object"
   },
   "Problema": {
    "properties": {
     "codigo": {
      "description": "Código estável (ex.: VALIDACAO, CERTIFICADO_INVALIDO, COTA_ESGOTADA, ASSINATURA_INATIVA, IDEMPOTENCIA_CONFLITO)",
      "type": "string"
     },
     "detail": {
      "description": "Detalhe",
      "type": "string"
     },
     "erros": {
      "items": {
       "properties": {
        "campo": {
         "description": "Caminho do campo",
         "type": "string"
        },
        "codigo": {
         "description": "Código",
         "type": "string"
        },
        "mensagem": {
         "description": "Mensagem",
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     },
     "rastreio_id": {
      "description": "Informe ao suporte",
      "type": "string"
     },
     "status": {
      "type": "integer"
     },
     "title": {
      "description": "Resumo",
      "type": "string"
     },
     "type": {
      "description": "URI do tipo do problema",
      "type": "string"
     }
    },
    "required": [
     "status",
     "codigo"
    ],
    "type": "object"
   }
  },
  "securitySchemes": {
   "bearer": {
    "description": "Chave de API (hx_test_… ou hx_live_…) ou token de sessão do painel",
    "scheme": "bearer",
    "type": "http"
   },
   "chave": {
    "in": "header",
    "name": "X-Api-Key",
    "type": "apiKey"
   }
  }
 },
 "info": {
  "description": "API fiscal: NFS-e Nacional, NF-e e NFC-e, DF-e recebidos, tributos da reforma, webhooks e automações. Veja também /llms.txt.",
  "title": "HXAPI",
  "version": "9de43f5"
 },
 "openapi": "3.1.0",
 "paths": {
  "/": {
   "get": {
    "operationId": "get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Página inicial com o menu de documentos (HTML)",
    "tags": [
     "saude"
    ]
   }
  },
  "/.well-known/oauth-authorization-server": {
   "get": {
    "operationId": "get__well_known_oauth_authorization_server",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Metadados do servidor de autorização OAuth 2.1 (RFC 8414)",
    "tags": [
     ".well-known"
    ]
   }
  },
  "/.well-known/oauth-protected-resource": {
   "get": {
    "operationId": "get__well_known_oauth_protected_resource",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Metadados do recurso protegido MCP (RFC 9728)",
    "tags": [
     ".well-known"
    ]
   }
  },
  "/.well-known/oauth-protected-resource/mcp": {
   "get": {
    "operationId": "get__well_known_oauth_protected_resource_mcp",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Metadados do recurso protegido MCP (RFC 9728)",
    "tags": [
     ".well-known"
    ]
   }
  },
  "/docs": {
   "get": {
    "operationId": "get_docs",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Referência navegável da API (HTML)",
    "tags": [
     "docs"
    ]
   }
  },
  "/llms.txt": {
   "get": {
    "operationId": "get_llms_txt",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Documentação resumida para agentes de IA (Markdown)",
    "tags": [
     "llms.txt"
    ]
   }
  },
  "/mcp": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_mcp",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Servidor MCP (Streamable HTTP) para agentes de IA",
    "tags": [
     "mcp"
    ]
   }
  },
  "/oauth/autorizar": {
   "get": {
    "operationId": "get_oauth_autorizar",
    "responses": {
     "302": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Início da autorização (código com PKCE S256); leva ao consentimento no painel",
    "tags": [
     "oauth"
    ]
   }
  },
  "/oauth/registrar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_oauth_registrar",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Registro dinâmico de cliente MCP público (RFC 7591)",
    "tags": [
     "oauth"
    ]
   }
  },
  "/oauth/revogar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_oauth_revogar",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Revoga um token OAuth (RFC 7009)",
    "tags": [
     "oauth"
    ]
   }
  },
  "/oauth/token": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_oauth_token",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Troca o código ou o refresh token por tokens (form-urlencoded)",
    "tags": [
     "oauth"
    ]
   }
  },
  "/saude": {
   "get": {
    "operationId": "get_saude",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Processo no ar (sem tocar dependências)",
    "tags": [
     "saude"
    ]
   }
  },
  "/saude/dependencias": {
   "get": {
    "operationId": "get_saude_dependencias",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Situação do MySQL, Redis e armazenamento",
    "tags": [
     "saude"
    ]
   }
  },
  "/v1/auditoria": {
   "get": {
    "description": "Escopo: `auditoria:ler`.",
    "operationId": "get_auditoria",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Trilha de auditoria",
    "tags": [
     "auditoria"
    ]
   }
  },
  "/v1/automacoes": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_automacoes",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Regras de automação",
    "tags": [
     "automacoes"
    ]
   },
   "post": {
    "description": "Escopo: `conta:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_automacoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cria regra (gatilho, filtros, ações)",
    "tags": [
     "automacoes"
    ]
   }
  },
  "/v1/automacoes/{id}": {
   "delete": {
    "description": "Escopo: `conta:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_automacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui regra",
    "tags": [
     "automacoes"
    ]
   },
   "put": {
    "description": "Escopo: `conta:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_automacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera regra",
    "tags": [
     "automacoes"
    ]
   }
  },
  "/v1/automacoes/{id}/execucoes": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_automacoes_id_execucoes",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Histórico de execuções",
    "tags": [
     "automacoes"
    ]
   }
  },
  "/v1/autorizadores/status": {
   "get": {
    "operationId": "get_autorizadores_status",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Situação dos autorizadores da NF-e e NFC-e",
    "tags": [
     "autorizadores"
    ]
   }
  },
  "/v1/cadastro": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_cadastro",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Cria conta e usuário proprietário",
    "tags": [
     "cadastro"
    ]
   }
  },
  "/v1/chaves": {
   "get": {
    "description": "Escopo: `chaves:ler`.",
    "operationId": "get_chaves",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Chaves de API",
    "tags": [
     "chaves"
    ]
   },
   "post": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_chaves",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cria chave de API (o token só aparece nesta resposta)",
    "tags": [
     "chaves"
    ]
   }
  },
  "/v1/chaves/{id}": {
   "delete": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_chaves_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Revoga chave",
    "tags": [
     "chaves"
    ]
   },
   "patch": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_chaves_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera chave (nome, escopos, emitentes, IPs)",
    "tags": [
     "chaves"
    ]
   }
  },
  "/v1/cobranca/assinatura": {
   "delete": {
    "description": "Escopo: `cobranca:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_cobranca_assinatura",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cancela no fim do período pago",
    "tags": [
     "cobranca"
    ]
   },
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_cobranca_assinatura",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Assinatura e faturas pendentes",
    "tags": [
     "cobranca"
    ]
   },
   "post": {
    "description": "Escopo: `cobranca:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_cobranca_assinatura",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Assina plano (cartao, pix ou checkout)",
    "tags": [
     "cobranca"
    ]
   }
  },
  "/v1/cobranca/faturas": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_cobranca_faturas",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Faturas",
    "tags": [
     "cobranca"
    ]
   }
  },
  "/v1/cobranca/planos": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_cobranca_planos",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Planos disponíveis",
    "tags": [
     "cobranca"
    ]
   }
  },
  "/v1/cobranca/recargas": {
   "post": {
    "description": "Escopo: `cobranca:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_cobranca_recargas",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Recarga da carteira por Pix",
    "tags": [
     "cobranca"
    ]
   }
  },
  "/v1/consultas/chave": {
   "post": {
    "description": "Escopo: `consultas:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_consultas_chave",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Situação de uma NF-e/NFC-e pela chave, direto na SEFAZ",
    "tags": [
     "consultas"
    ]
   }
  },
  "/v1/consultas/cnpj/{cnpj}": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_consultas_cnpj_cnpj",
    "parameters": [
     {
      "in": "path",
      "name": "cnpj",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Dados cadastrais de um CNPJ",
    "tags": [
     "consultas"
    ]
   }
  },
  "/v1/conta": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_conta",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Dados da conta",
    "tags": [
     "conta"
    ]
   },
   "patch": {
    "description": "Escopo: `conta:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_conta",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera a conta",
    "tags": [
     "conta"
    ]
   }
  },
  "/v1/conta/carteira": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_conta_carteira",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Extrato da carteira",
    "tags": [
     "conta"
    ]
   }
  },
  "/v1/conta/consumo": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_conta_consumo",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Plano, cota, consumo do ciclo e saldo",
    "tags": [
     "conta"
    ]
   }
  },
  "/v1/documentos": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Documentos emitidos (?tipo, ?status, ?ambiente, ?emitente_id, ?referencia_externa, ?chave, ?inicio, ?fim)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/por-referencia/{ref}": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_por_referencia_ref",
    "parameters": [
     {
      "in": "path",
      "name": "ref",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Documento"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Documento pela referência do integrador",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Documento"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Documento",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/email": {
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_documentos_id_email",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Envia XML e PDF por e-mail",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/eventos": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_id_eventos",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Eventos do documento",
    "tags": [
     "documentos"
    ]
   },
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:cancelar ou \u003ctipo\u003e:eventos`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_documentos_id_eventos",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Evento"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Registra evento (cancelamento, carta_correcao, cancelamento_substituicao)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/pdf": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_id_pdf",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Documento auxiliar (?layout=58|80, ?formato=pdf|escpos, ?resumido=true)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/requisicoes": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_id_requisicoes",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Chamadas ao autorizador (XML enviado e recebido)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/sincronizar": {
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_documentos_id_sincronizar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Documento"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Retransmite/consulta o autorizador agora",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{id}/xml": {
   "get": {
    "description": "Escopo: `\u003ctipo\u003e:ler`.",
    "operationId": "get_documentos_id_xml",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "XML autorizado (nfeProc, NFS-e)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{tipo}": {
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:emitir`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_documentos_tipo",
    "parameters": [
     {
      "in": "path",
      "name": "tipo",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Emissao"
       }
      }
     },
     "required": true
    },
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Documento"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Emite documento (nfse, nfe, nfce, cte, cteos, gtve, mdfe, bpe, nf3e, nfcom, nfag, nfgas, dce). Envie Idempotency-Key",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/documentos/{tipo}/validar": {
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:emitir`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_documentos_tipo_validar",
    "parameters": [
     {
      "in": "path",
      "name": "tipo",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Emissao"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Monta, valida e assina como na emissão, sem transmitir nem numerar (prévia)",
    "tags": [
     "documentos"
    ]
   }
  },
  "/v1/emitentes": {
   "get": {
    "description": "Escopo: `emitentes:ler`.",
    "operationId": "get_emitentes",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Emitentes",
    "tags": [
     "emitentes"
    ]
   },
   "post": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Emitente"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Emitente"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cadastra emitente",
    "tags": [
     "emitentes"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}": {
   "delete": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui emitente",
    "tags": [
     "emitentes"
    ]
   },
   "get": {
    "description": "Escopo: `emitentes:ler`.",
    "operationId": "get_emitentes_emitente_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Emitente"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Emitente",
    "tags": [
     "emitentes"
    ]
   },
   "patch": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_emitentes_emitente_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Emitente"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Emitente"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera emitente",
    "tags": [
     "emitentes"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/certificados": {
   "get": {
    "description": "Escopo: `certificados:ler`.",
    "operationId": "get_emitentes_emitente_id_certificados",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Certificados A1",
    "tags": [
     "certificados"
    ]
   },
   "post": {
    "description": "Escopo: `certificados:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_certificados",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Envia certificado A1 (multipart: arquivo, senha)",
    "tags": [
     "certificados"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/certificados/{id}": {
   "delete": {
    "description": "Escopo: `certificados:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id_certificados_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui certificado",
    "tags": [
     "certificados"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/certificados/{id}/testar": {
   "post": {
    "description": "Escopo: `certificados:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_certificados_id_testar",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Testa assinatura e cadeia do certificado",
    "tags": [
     "certificados"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/itens": {
   "get": {
    "description": "Escopo: `itens:ler`.",
    "operationId": "get_emitentes_emitente_id_itens",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Itens (produtos e serviços)",
    "tags": [
     "itens"
    ]
   },
   "post": {
    "description": "Escopo: `itens:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_itens",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cadastra item",
    "tags": [
     "itens"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/itens/{id}": {
   "delete": {
    "description": "Escopo: `itens:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id_itens_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui item",
    "tags": [
     "itens"
    ]
   },
   "get": {
    "description": "Escopo: `itens:ler`.",
    "operationId": "get_emitentes_emitente_id_itens_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Item",
    "tags": [
     "itens"
    ]
   },
   "patch": {
    "description": "Escopo: `itens:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_emitentes_emitente_id_itens_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera item",
    "tags": [
     "itens"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/logo": {
   "delete": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id_logo",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Remove o logo",
    "tags": [
     "logo"
    ]
   },
   "put": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_emitentes_emitente_id_logo",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Envia o logo (PNG/JPEG no corpo)",
    "tags": [
     "logo"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/mdfe/nao-encerrados": {
   "get": {
    "description": "Escopo: `mdfe:ler`.",
    "operationId": "get_emitentes_emitente_id_mdfe_nao_encerrados",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "MDF-e autorizados e ainda não encerrados na SEFAZ (?ambiente)",
    "tags": [
     "mdfe"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/modelos/{modelo}": {
   "get": {
    "description": "Escopo: `emitentes:ler`.",
    "operationId": "get_emitentes_emitente_id_modelos_modelo",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "modelo",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Configuração do modelo (série padrão, CSC da NFC-e, IBS/CBS)",
    "tags": [
     "modelos"
    ]
   },
   "put": {
    "description": "Escopo: `emitentes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_emitentes_emitente_id_modelos_modelo",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "modelo",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera a configuração do modelo",
    "tags": [
     "modelos"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/nfse/sincronizar": {
   "post": {
    "description": "Escopo: `nfse:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_nfse_sincronizar",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Importa NFS-e prestadas ou tomadas no provedor municipal (?direcao=prestadas|tomadas, ?inicio, ?fim, ?ambiente)",
    "tags": [
     "nfse"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/participantes": {
   "get": {
    "description": "Escopo: `participantes:ler`.",
    "operationId": "get_emitentes_emitente_id_participantes",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Participantes (clientes, fornecedores)",
    "tags": [
     "participantes"
    ]
   },
   "post": {
    "description": "Escopo: `participantes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_participantes",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cadastra participante",
    "tags": [
     "participantes"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/participantes/{id}": {
   "delete": {
    "description": "Escopo: `participantes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id_participantes_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui participante",
    "tags": [
     "participantes"
    ]
   },
   "get": {
    "description": "Escopo: `participantes:ler`.",
    "operationId": "get_emitentes_emitente_id_participantes_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Participante",
    "tags": [
     "participantes"
    ]
   },
   "patch": {
    "description": "Escopo: `participantes:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_emitentes_emitente_id_participantes_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera participante",
    "tags": [
     "participantes"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/perfis-tributarios": {
   "get": {
    "description": "Escopo: `perfis:ler`.",
    "operationId": "get_emitentes_emitente_id_perfis_tributarios",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Perfis tributários",
    "tags": [
     "perfis-tributarios"
    ]
   },
   "post": {
    "description": "Escopo: `perfis:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_perfis_tributarios",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cadastra perfil tributário (regras padrão e por destino)",
    "tags": [
     "perfis-tributarios"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/perfis-tributarios/{id}": {
   "delete": {
    "description": "Escopo: `perfis:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_emitentes_emitente_id_perfis_tributarios_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui perfil",
    "tags": [
     "perfis-tributarios"
    ]
   },
   "get": {
    "description": "Escopo: `perfis:ler`.",
    "operationId": "get_emitentes_emitente_id_perfis_tributarios_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Perfil tributário",
    "tags": [
     "perfis-tributarios"
    ]
   },
   "patch": {
    "description": "Escopo: `perfis:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_emitentes_emitente_id_perfis_tributarios_id",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera perfil",
    "tags": [
     "perfis-tributarios"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/recebidos/configuracao": {
   "put": {
    "description": "Escopo: `recebidos:manifestar`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_emitentes_emitente_id_recebidos_configuracao",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Sincronização automática e ciência automática",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/recebidos/estado": {
   "get": {
    "description": "Escopo: `recebidos:ler`.",
    "operationId": "get_emitentes_emitente_id_recebidos_estado",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Último NSU, última e próxima consulta",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/emitentes/{emitente_id}/recebidos/sincronizar": {
   "post": {
    "description": "Escopo: `recebidos:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_emitentes_emitente_id_recebidos_sincronizar",
    "parameters": [
     {
      "in": "path",
      "name": "emitente_id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Busca DF-e destinados por NSU (?servico=nfe|cte|mdfe; respeita a espera da SEFAZ)",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/exportacoes": {
   "get": {
    "description": "Escopo: `relatorios:ler`.",
    "operationId": "get_exportacoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exportações",
    "tags": [
     "exportacoes"
    ]
   },
   "post": {
    "description": "Escopo: `relatorios:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_exportacoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exporta emitidos ou recebidos (csv, xlsx, zip_xml) em segundo plano",
    "tags": [
     "exportacoes"
    ]
   }
  },
  "/v1/exportacoes/{id}": {
   "get": {
    "description": "Escopo: `relatorios:ler`.",
    "operationId": "get_exportacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exportação e link de download",
    "tags": [
     "exportacoes"
    ]
   }
  },
  "/v1/interno/atualizacoes": {
   "get": {
    "operationId": "get_interno_atualizacoes",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Fila de mudanças regulatórias (só operadores da plataforma com 2FA)",
    "tags": [
     "interno"
    ]
   }
  },
  "/v1/interno/atualizacoes/{id}": {
   "get": {
    "operationId": "get_interno_atualizacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Mudança regulatória com diff e relatório (só operadores)",
    "tags": [
     "interno"
    ]
   },
   "patch": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_interno_atualizacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Move a mudança na fila (só operadores)",
    "tags": [
     "interno"
    ]
   }
  },
  "/v1/inutilizacoes": {
   "get": {
    "operationId": "get_inutilizacoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Inutilizações",
    "tags": [
     "inutilizacoes"
    ]
   },
   "post": {
    "description": "Escopo: `\u003ctipo\u003e:inutilizar`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_inutilizacoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Inutiliza faixa de numeração (NF-e/NFC-e)",
    "tags": [
     "inutilizacoes"
    ]
   }
  },
  "/v1/inutilizacoes/{id}": {
   "get": {
    "operationId": "get_inutilizacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Inutilização",
    "tags": [
     "inutilizacoes"
    ]
   }
  },
  "/v1/llms.txt": {
   "get": {
    "operationId": "get_llms_txt_2",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Documentação resumida para agentes de IA (Markdown)",
    "tags": [
     "llms.txt"
    ]
   }
  },
  "/v1/logs/requisicoes": {
   "get": {
    "description": "Escopo: `metricas:ler`.",
    "operationId": "get_logs_requisicoes",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Requisições recebidas",
    "tags": [
     "logs"
    ]
   }
  },
  "/v1/mcp/confirmacoes": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_mcp_confirmacoes",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Atos pedidos por agentes de IA aguardando aprovação (?status=pendente)",
    "tags": [
     "mcp"
    ]
   }
  },
  "/v1/mcp/confirmacoes/{id}/aprovar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_mcp_confirmacoes_id_aprovar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Aprova um ato pedido por agente de IA (só usuários do painel)",
    "tags": [
     "mcp"
    ]
   }
  },
  "/v1/mcp/confirmacoes/{id}/recusar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_mcp_confirmacoes_id_recusar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Recusa um ato pedido por agente de IA",
    "tags": [
     "mcp"
    ]
   }
  },
  "/v1/metricas/api": {
   "get": {
    "description": "Escopo: `metricas:ler`.",
    "operationId": "get_metricas_api",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Volume, sucesso e latência da API",
    "tags": [
     "metricas"
    ]
   }
  },
  "/v1/metricas/fiscal": {
   "get": {
    "description": "Escopo: `metricas:ler`.",
    "operationId": "get_metricas_fiscal",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Chamadas aos autorizadores e rejeições frequentes",
    "tags": [
     "metricas"
    ]
   }
  },
  "/v1/oauth/concessoes": {
   "get": {
    "description": "Escopo: `chaves:ler`.",
    "operationId": "get_oauth_concessoes",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Aplicativos autorizados por OAuth",
    "tags": [
     "oauth"
    ]
   }
  },
  "/v1/oauth/concessoes/{id}": {
   "delete": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_oauth_concessoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Revoga um aplicativo autorizado",
    "tags": [
     "oauth"
    ]
   }
  },
  "/v1/oauth/pedidos/{id}": {
   "get": {
    "description": "Escopo: `chaves:escrever`.",
    "operationId": "get_oauth_pedidos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Pedido de autorização aguardando consentimento (só usuários do painel)",
    "tags": [
     "oauth"
    ]
   }
  },
  "/v1/oauth/pedidos/{id}/aprovar": {
   "post": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_oauth_pedidos_id_aprovar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Aprova o aplicativo com escopos, emitentes e ambiente; devolve o redirect",
    "tags": [
     "oauth"
    ]
   }
  },
  "/v1/oauth/pedidos/{id}/recusar": {
   "post": {
    "description": "Escopo: `chaves:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_oauth_pedidos_id_recusar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Recusa o aplicativo; devolve o redirect com access_denied",
    "tags": [
     "oauth"
    ]
   }
  },
  "/v1/openapi.json": {
   "get": {
    "operationId": "get_openapi_json",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Esta especificação OpenAPI 3.1",
    "tags": [
     "openapi.json"
    ]
   }
  },
  "/v1/publico/arquivos/exportacoes/{id}": {
   "get": {
    "operationId": "get_publico_arquivos_exportacoes_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Download de exportação por link assinado (?expira, ?assinatura)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/cobranca/mercadopago": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_publico_cobranca_mercadopago",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Avisos do Mercado Pago (uso interno do gateway)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/login-social": {
   "get": {
    "operationId": "get_publico_login_social",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Provedores de login social ativos (google, github)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/nfse/codigos-tributacao": {
   "get": {
    "operationId": "get_publico_nfse_codigos_tributacao",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Lista de serviço nacional (códigos de tributação)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/nfse/municipios": {
   "get": {
    "operationId": "get_publico_nfse_municipios",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Municípios e cobertura da NFS-e Nacional (?situacao, ?uf, ?busca)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/nfse/municipios/{ibge}": {
   "get": {
    "operationId": "get_publico_nfse_municipios_ibge",
    "parameters": [
     {
      "in": "path",
      "name": "ibge",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Cobertura e convênio de um município",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/nfse/nbs": {
   "get": {
    "operationId": "get_publico_nfse_nbs",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Tabela NBS (?busca, ?emitivel=true)",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/nfse/provedores": {
   "get": {
    "operationId": "get_publico_nfse_provedores",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Provedores municipais de NFS-e com driver (ABRASF 2.x) e os pendentes",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/publico/planos": {
   "get": {
    "operationId": "get_publico_planos",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Planos públicos e preços",
    "tags": [
     "publico"
    ]
   }
  },
  "/v1/rascunhos": {
   "get": {
    "operationId": "get_rascunhos",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Lista os rascunhos de emissão da conta (dos tipos que o chamador pode emitir)",
    "tags": [
     "rascunhos"
    ]
   },
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_rascunhos",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Guarda um rascunho de emissão (formulário do painel) em JSON",
    "tags": [
     "rascunhos"
    ]
   }
  },
  "/v1/rascunhos/{id}": {
   "delete": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_rascunhos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui um rascunho",
    "tags": [
     "rascunhos"
    ]
   },
   "get": {
    "operationId": "get_rascunhos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Obtém um rascunho com os dados",
    "tags": [
     "rascunhos"
    ]
   },
   "put": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_rascunhos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Substitui um rascunho",
    "tags": [
     "rascunhos"
    ]
   }
  },
  "/v1/recebidos": {
   "get": {
    "description": "Escopo: `recebidos:ler`.",
    "operationId": "get_recebidos",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "DF-e recebidos (?emitente_id, ?manifestacao, ?situacao, ?emissor, ?inicio, ?fim)",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/manifestacao-lote": {
   "post": {
    "description": "Escopo: `recebidos:manifestar`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_recebidos_manifestacao_lote",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Manifesta até 50 recebidos",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/{id}": {
   "get": {
    "description": "Escopo: `recebidos:ler`.",
    "operationId": "get_recebidos_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Recebido e seus eventos",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/{id}/desacordo": {
   "post": {
    "description": "Escopo: `recebidos:manifestar`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_recebidos_id_desacordo",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Prestação do serviço em desacordo (tomador de CT-e recebido, evento 610110)",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/{id}/manifestacao": {
   "post": {
    "description": "Escopo: `recebidos:manifestar`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_recebidos_id_manifestacao",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Manifestação do destinatário (ciencia, confirmacao, desconhecimento, operacao_nao_realizada)",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/{id}/pdf": {
   "get": {
    "description": "Escopo: `recebidos:ler`.",
    "operationId": "get_recebidos_id_pdf",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "DANFE do recebido",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/recebidos/{id}/xml": {
   "get": {
    "description": "Escopo: `recebidos:ler`.",
    "operationId": "get_recebidos_id_xml",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "XML completo do recebido",
    "tags": [
     "recebidos"
    ]
   }
  },
  "/v1/relatorios/resumo": {
   "get": {
    "description": "Escopo: `relatorios:ler`.",
    "operationId": "get_relatorios_resumo",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Resumo por tipo, situação e mês, com tributos",
    "tags": [
     "relatorios"
    ]
   }
  },
  "/v1/sessoes": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_sessoes",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Login no painel (devolve token de sessão)",
    "tags": [
     "sessoes"
    ]
   }
  },
  "/v1/sessoes/atual": {
   "delete": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_sessoes_atual",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Encerra a sessão atual",
    "tags": [
     "sessoes"
    ]
   }
  },
  "/v1/sessoes/social/2fa": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_sessoes_social_2fa",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Segundo fator do login social (desafio + codigo_2fa)",
    "tags": [
     "sessoes"
    ]
   }
  },
  "/v1/sessoes/social/{provedor}": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_sessoes_social_provedor",
    "parameters": [
     {
      "in": "path",
      "name": "provedor",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Conclui o login social com code e state; cria a conta no primeiro acesso",
    "tags": [
     "sessoes"
    ]
   }
  },
  "/v1/sessoes/social/{provedor}/inicio": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_sessoes_social_provedor_inicio",
    "parameters": [
     {
      "in": "path",
      "name": "provedor",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "security": [],
    "summary": "Inicia o login social: devolve o endereço do provedor (state e PKCE)",
    "tags": [
     "sessoes"
    ]
   }
  },
  "/v1/tabelas/{nome}": {
   "get": {
    "operationId": "get_tabelas_nome",
    "parameters": [
     {
      "in": "path",
      "name": "nome",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Tabelas oficiais: municipios, ncm, cfop, cclasstrib, cst-ibs-cbs, paises, fcp, nbs, servicos-nacionais, indicadores-operacao",
    "tags": [
     "tabelas"
    ]
   }
  },
  "/v1/tipos/{tipo}/eventos": {
   "get": {
    "operationId": "get_tipos_tipo_eventos",
    "parameters": [
     {
      "in": "path",
      "name": "tipo",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Eventos aceitos por modelo",
    "tags": [
     "tipos"
    ]
   }
  },
  "/v1/tipos/{tipo}/exemplo": {
   "get": {
    "operationId": "get_tipos_tipo_exemplo",
    "parameters": [
     {
      "in": "path",
      "name": "tipo",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Pedido de emissão de exemplo, válido no XSD oficial (CT-e, MDF-e e demais DF-e; ?variante=)",
    "tags": [
     "tipos"
    ]
   }
  },
  "/v1/tributos/calcular": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_tributos_calcular",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Emissao"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Calcula tributos e totais sem emitir (mesmo envelope da emissão + tipo)",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/class-trib": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_tributos_class_trib",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Tabela cClassTrib (?busca)",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/class-trib/{codigo}": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_tributos_class_trib_codigo",
    "parameters": [
     {
      "in": "path",
      "name": "codigo",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Classificação tributária e CST",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/ibpt": {
   "get": {
    "description": "Escopo: `conta:ler`.",
    "operationId": "get_tributos_ibpt",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Tabelas IBPT importadas",
    "tags": [
     "tributos"
    ]
   },
   "post": {
    "description": "Escopo: `conta:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_tributos_ibpt",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Importa o CSV do IBPT da UF (?uf=)",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/ibs-cbs": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_tributos_ibs_cbs",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Alíquotas padrão de IBS e CBS na data",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/iss": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_tributos_iss",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Parâmetros do ISS do serviço no município (Sefin Nacional)",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/ncm/{ncm}": {
   "get": {
    "description": "Escopo: `consultas:ler`.",
    "operationId": "get_tributos_ncm_ncm",
    "parameters": [
     {
      "in": "path",
      "name": "ncm",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "NCM vigente e aproximados do IBPT (?uf_destino)",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/tributos/split-payment/simular": {
   "post": {
    "description": "Escopo: `consultas:ler`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_tributos_split_payment_simular",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Simulação informativa do split payment",
    "tags": [
     "tributos"
    ]
   }
  },
  "/v1/usuarios": {
   "get": {
    "description": "Escopo: `usuarios:ler`.",
    "operationId": "get_usuarios",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Usuários da conta",
    "tags": [
     "usuarios"
    ]
   },
   "post": {
    "description": "Escopo: `usuarios:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_usuarios",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Convida/cria usuário",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu": {
   "get": {
    "operationId": "get_usuarios_eu",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Usuário e conta da credencial",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/2fa": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_usuarios_eu_2fa",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Inicia o cadastro do segundo fator (TOTP)",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/2fa/ativar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_usuarios_eu_2fa_ativar",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Ativa o segundo fator",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/2fa/desativar": {
   "post": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_usuarios_eu_2fa_desativar",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Desativa o segundo fator",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/identidades": {
   "get": {
    "operationId": "get_usuarios_eu_identidades",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Provedores de login social vinculados ao usuário",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/identidades/{provedor}": {
   "delete": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_usuarios_eu_identidades_provedor",
    "parameters": [
     {
      "in": "path",
      "name": "provedor",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Desvincula um provedor de login social (exige senha definida se for o único)",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/eu/senha": {
   "put": {
    "description": "Aceita `Idempotency-Key` (24 h).",
    "operationId": "put_usuarios_eu_senha",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Troca a senha",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/usuarios/{id}": {
   "delete": {
    "description": "Escopo: `usuarios:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_usuarios_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Remove usuário",
    "tags": [
     "usuarios"
    ]
   },
   "patch": {
    "description": "Escopo: `usuarios:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_usuarios_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera usuário (papel, ativo)",
    "tags": [
     "usuarios"
    ]
   }
  },
  "/v1/webhooks": {
   "get": {
    "description": "Escopo: `webhooks:ler`.",
    "operationId": "get_webhooks",
    "parameters": [
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Webhooks",
    "tags": [
     "webhooks"
    ]
   },
   "post": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_webhooks",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "201": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Cadastra webhook (o segredo só aparece nesta resposta)",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/entregas/{id}/reenviar": {
   "post": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_webhooks_entregas_id_reenviar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Reenvia uma entrega",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{id}": {
   "delete": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "delete_webhooks_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "204": {
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Exclui webhook",
    "tags": [
     "webhooks"
    ]
   },
   "get": {
    "description": "Escopo: `webhooks:ler`.",
    "operationId": "get_webhooks_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Webhook",
    "tags": [
     "webhooks"
    ]
   },
   "patch": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "patch_webhooks_id",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "422": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Altera webhook",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{id}/entregas": {
   "get": {
    "description": "Escopo: `webhooks:ler`.",
    "operationId": "get_webhooks_id_entregas",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/Limite"
     },
     {
      "$ref": "#/components/parameters/Apos"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Lista"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Histórico de entregas",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{id}/rotacionar-segredo": {
   "post": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_webhooks_id_rotacionar_segredo",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Gera novo segredo (o anterior vale por 24 h)",
    "tags": [
     "webhooks"
    ]
   }
  },
  "/v1/webhooks/{id}/testar": {
   "post": {
    "description": "Escopo: `webhooks:escrever`. Aceita `Idempotency-Key` (24 h).",
    "operationId": "post_webhooks_id_testar",
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Sucesso"
     },
     "401": {
      "$ref": "#/components/responses/Problema"
     },
     "403": {
      "$ref": "#/components/responses/Problema"
     },
     "default": {
      "$ref": "#/components/responses/Problema"
     }
    },
    "summary": "Envia um evento de teste",
    "tags": [
     "webhooks"
    ]
   }
  }
 },
 "security": [
  {
   "bearer": []
  },
  {
   "chave": []
  }
 ],
 "servers": [
  {
   "url": "https://api.hexasistemas.com.br"
  }
 ]
}