{
  "openapi": "3.1.0",
  "info": {
    "title": "FiscalAPI",
    "description": "API REST da FiscalAPI para consultar inscrição estadual (IE) nos 27 estados, CNPJ, certidões negativas estaduais e federais, XML de NF-e pela chave de acesso, imóveis rurais (CNIR e SIGEF), Simples Nacional, status da SEFAZ e o catálogo de rejeições da NF-e.\n\nAutenticação: envie a sua chave no cabeçalho `X-API-Key`. A chave é criada no painel (app.fiscalapi.com.br); sem ela, ou com chave inválida, a resposta é 403.\n\nCobrança: as consultas usam o saldo do plano. Conta que nunca assinou, com e-mail confirmado, tem 10 consultas grátis por mês de IE (em um estado) e de CNPJ, somadas com as do painel. O resto pede plano ou saldo, e a chamada sem saldo devolve 402. Limite por minuto conforme o plano; acima dele, 429 com o cabeçalho Retry-After.\n\nDocumentação completa: https://docs.fiscalapi.com.br",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.fiscalapi.com.br"
    }
  ],
  "paths": {
    "/api/consultar": {
      "get": {
        "tags": [
          "Consulta IE"
        ],
        "summary": "Consultar Inscrição Estadual",
        "description": "Consulta a inscrição estadual de um produtor rural na SEFAZ do estado informado. Aceita CPF, CNPJ ou IE como documento de busca. Retorna os dados cadastrais do contribuinte.",
        "operationId": "consultar_api_consultar_get",
        "parameters": [
          {
            "name": "uf",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Uf"
            }
          },
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cpf"
            }
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cnpj"
            }
          },
          {
            "name": "ie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Ie"
            }
          },
          {
            "name": "secundarias",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Busca no estado as atividades secundárias de cada inscrição (campo cnaes_secundarios). Pode somar de alguns até dezenas de segundos, conforme o estado. Sem o parâmetro, o campo traz o que já foi obtido antes ou null.",
              "default": false,
              "title": "Secundarias"
            },
            "description": "Busca no estado as atividades secundárias de cada inscrição (campo cnaes_secundarios). Pode somar de alguns até dezenas de segundos, conforme o estado. Sem o parâmetro, o campo traz o que já foi obtido antes ou null."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsultationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Documento inválido, ausente, conflitante ou UF não suportada",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta (ou cota grátis do mês usada). Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "502": {
            "description": "Falha ao processar a consulta na fonte oficial",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "503": {
            "description": "Fonte oficial de consulta cadastral indisponível",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cnpj": {
      "get": {
        "tags": [
          "Enriquecimento"
        ],
        "summary": "Consultar CNPJ na Receita Federal",
        "description": "Consulta dados públicos de um CNPJ na Receita Federal. Retorna razão social, situação cadastral (com motivo e situação especial), data de abertura, matriz ou filial, CNAE, endereço, telefones, e-mail, quadro societário e a opção pelo Simples Nacional e pelo MEI. Simples e MEI vêm da base mensal da Receita Federal; na consulta ao vivo (force_fresh=true) esses campos voltam null.",
        "operationId": "consultar_cnpj_api_consultar_cnpj_get",
        "parameters": [
          {
            "name": "cnpj",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Cnpj"
            }
          },
          {
            "name": "force_fresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Consulta a Receita Federal AO VIVO (dado atual), ignorando o cache. Mais lento e custa mais; use quando precisar do dado mais recente.",
              "default": false,
              "title": "Force Fresh"
            },
            "description": "Consulta a Receita Federal AO VIVO (dado atual), ignorando o cache. Mais lento e custa mais; use quando precisar do dado mais recente."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CNPJResponse"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta (ou cota grátis do mês usada). Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-ie-todos": {
      "get": {
        "tags": [
          "Enriquecimento"
        ],
        "summary": "Consultar IE em Todos os Estados",
        "description": "Consulta a inscrição estadual de um produtor em todos os estados suportados simultaneamente. Aceita CPF, CNPJ ou o próprio número da IE (a UF é descoberta automaticamente pela varredura).",
        "operationId": "consultar_ie_todos_api_consultar_ie_todos_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cpf"
            }
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cnpj"
            }
          },
          {
            "name": "ie",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Ie"
            }
          },
          {
            "name": "secundarias",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Busca no estado as atividades secundárias de cada inscrição (campo cnaes_secundarios). Pode somar de alguns até dezenas de segundos, conforme o estado. Sem o parâmetro, o campo traz o que já foi obtido antes ou null.",
              "default": false,
              "title": "Secundarias"
            },
            "description": "Busca no estado as atividades secundárias de cada inscrição (campo cnaes_secundarios). Pode somar de alguns até dezenas de segundos, conforme o estado. Sem o parâmetro, o campo traz o que já foi obtido antes ou null."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrossStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ausente ou conflitante",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/perfil-produtor": {
      "get": {
        "tags": [
          "Enriquecimento"
        ],
        "summary": "Perfil Completo do Produtor",
        "description": "Gera perfil consolidado do produtor rural combinando inscrições estaduais de todos os estados suportados. Se informado CNPJ, também consulta dados da Receita Federal.",
        "operationId": "perfil_produtor_api_perfil_produtor_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cpf"
            }
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cnpj"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProducerProfile"
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "502": {
            "description": "Todas as fontes de dados falharam",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cnd": {
      "get": {
        "tags": [
          "CND Estadual"
        ],
        "summary": "Consultar CND Estadual por UF",
        "description": "Consulta Certidão Negativa de Débitos Estadual (ICMS) para uma UF específica. Retorna status da certidão e PDF em base64.",
        "operationId": "consultar_cnd_api_consultar_cnd_get",
        "parameters": [
          {
            "name": "uf",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Sigla do estado (ex: MT, SP, RJ)",
              "title": "Uf"
            },
            "description": "Sigla do estado (ex: MT, SP, RJ)"
          },
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CNDResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cnd-todos": {
      "get": {
        "tags": [
          "CND Estadual"
        ],
        "summary": "Consultar CND em Todos os Estados",
        "description": "Consulta CND Estadual (ICMS) em todos os estados com consulta disponível. Retorna resultados parciais se alguns estados falharem.",
        "operationId": "consultar_cnd_todos_api_consultar_cnd_todos_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrossStateCNDResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cndt": {
      "get": {
        "tags": [
          "Certidoes Federais"
        ],
        "summary": "Consultar CNDT Trabalhista (TST)",
        "description": "Consulta Certidao Negativa de Debitos Trabalhistas junto ao TST.",
        "operationId": "consultar_cndt_api_consultar_cndt_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertidaoFederalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cnd-federal": {
      "get": {
        "tags": [
          "Certidoes Federais"
        ],
        "summary": "Consultar CND Federal (RF+PGFN)",
        "description": "Consulta Certidao Negativa de Debitos relativos a Tributos Federais e a Divida Ativa da Uniao (Receita Federal + PGFN). Se o contribuinte ja tem certidao que vale por mais de 3 dias, devolve essa (`modo=consulta`); se nao tem, emite uma nova (`modo=emissao`). Com `emitir_nova=true`, emite sempre.",
        "operationId": "consultar_cnd_federal_api_consultar_cnd_federal_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          },
          {
            "name": "emitir_nova",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Emite uma certidao nova mesmo que o contribuinte ja tenha uma valida.",
              "default": false,
              "title": "Emitir Nova"
            },
            "description": "Emite uma certidao nova mesmo que o contribuinte ja tenha uma valida."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertidaoFederalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-crf-fgts": {
      "get": {
        "tags": [
          "Certidoes Federais"
        ],
        "summary": "Consultar CRF/FGTS (Caixa)",
        "description": "Consulta Certificado de Regularidade do FGTS junto a Caixa Economica Federal.",
        "operationId": "consultar_crf_fgts_api_consultar_crf_fgts_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertidaoFederalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/certidoes-todas": {
      "get": {
        "tags": [
          "Certidoes Federais"
        ],
        "summary": "Consultar todas as certidoes (estaduais + federais)",
        "description": "Consulta consolidada: CND estaduais (27 UFs) + CNDT + CND Federal + CRF/FGTS em paralelo. Retorna resultados parciais se alguma fonte falhar.",
        "operationId": "consultar_certidoes_todas_api_certidoes_todas_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF do contribuinte",
              "title": "Cpf"
            },
            "description": "CPF do contribuinte"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ do contribuinte",
              "title": "Cnpj"
            },
            "description": "CNPJ do contribuinte"
          },
          {
            "name": "skip_estaduais",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Se True, pula CND estaduais",
              "default": false,
              "title": "Skip Estaduais"
            },
            "description": "Se True, pula CND estaduais"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertidoesTodasResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametro ausente",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-cnir": {
      "get": {
        "tags": [
          "CNIR"
        ],
        "summary": "Consultar Imóveis Rurais (CNIR/CAFIR)",
        "description": "Consulta dados de pessoa física ou jurídica e imóveis rurais cadastrados no CAFIR (Cadastro Fiscal de Imóveis Rurais) via CNIR. Retorna dados cadastrais, lista de imóveis com CIB, denominação, área total, situação, município/UF, dados tributários e condôminos.",
        "operationId": "consultar_cnir_endpoint_api_consultar_cnir_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cpf"
            }
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Cnpj"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CnirResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parâmetro ausente ou documento inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-simples-nacional": {
      "get": {
        "tags": [
          "Simples Nacional"
        ],
        "summary": "Consultar Optante pelo Simples Nacional",
        "description": "Consulta ao vivo na Receita Federal. Retorna situação no Simples Nacional (com data da opção), SIMEI, regimes regulares IBS/CBS (Reforma Tributária) e eventos futuros. Resultados ficam em cache por 24h.",
        "operationId": "consultar_simples_nacional_endpoint_api_consultar_simples_nacional_get",
        "parameters": [
          {
            "name": "cnpj",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "CNPJ com ou sem máscara",
              "title": "Cnpj"
            },
            "description": "CNPJ com ou sem máscara"
          }
        ],
        "responses": {
          "200": {
            "description": "Consulta realizada com sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimplesNacionalResponse"
                }
              }
            }
          },
          "400": {
            "description": "CNPJ inválido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "404": {
            "description": "CNPJ não encontrado na base da Receita",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "502": {
            "description": "Fonte oficial indisponível",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "503": {
            "description": "Consulta temporariamente indisponível (header Retry-After)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-sigef": {
      "get": {
        "tags": [
          "SIGEF"
        ],
        "summary": "Consultar Parcelas SIGEF (INCRA)",
        "description": "Consulta parcelas georreferenciadas de imoveis rurais certificadas no SIGEF (Sistema de Gestao Fundiaria do INCRA) para um CPF ou CNPJ. Retorna lista de parcelas com codigo, denominacao, area em hectares, municipio/UF, detentor e status de certificacao.",
        "operationId": "consultar_sigef_endpoint_api_consultar_sigef_get",
        "parameters": [
          {
            "name": "cpf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CPF (11 digitos) do detentor",
              "title": "Cpf"
            },
            "description": "CPF (11 digitos) do detentor"
          },
          {
            "name": "cnpj",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "CNPJ (14 digitos) do detentor",
              "title": "Cnpj"
            },
            "description": "CNPJ (14 digitos) do detentor"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigefResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parametro ausente ou documento invalido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-sigef-parcela": {
      "get": {
        "tags": [
          "SIGEF"
        ],
        "summary": "Consultar Parcela SIGEF pelo UUID",
        "description": "Consulta UMA parcela certificada no SIGEF pelo UUID da parcela, sem CPF/CNPJ do detentor. Retorna situacao, registro, poligono WKT, todos os vertices (ordem, indice, lado/anel, tipo, sigmas e altitude) e todos os limites com confrontantes. Nao retorna dados pessoais do detentor. Cache de 24h; force_fresh=true le de novo na fonte. consultado_em informa quando o dado foi lido.",
        "operationId": "consultar_sigef_parcela_endpoint_api_consultar_sigef_parcela_get",
        "parameters": [
          {
            "name": "uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "UUID da parcela no SIGEF",
              "title": "Uuid"
            },
            "description": "UUID da parcela no SIGEF"
          },
          {
            "name": "force_fresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Ignora o cache e le a parcela de novo na fonte",
              "default": false,
              "title": "Force Fresh"
            },
            "description": "Ignora o cache e le a parcela de novo na fonte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigefParcelaResponse"
                }
              }
            }
          },
          "400": {
            "description": "UUID ausente ou invalido",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno do servidor",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-nfe-xml": {
      "post": {
        "tags": [
          "NF-e XML"
        ],
        "summary": "Consultar XML de NF-e por chave, com certificado",
        "description": "Retorna o XML completo (nfeProc assinado) de UMA NF-e a partir da chave de acesso (44 posicoes; aceita CNPJ alfanumerico do emitente), usando o certificado digital do cliente (e-CPF/e-CNPJ) enviado na requisicao. Uma chave por requisicao. O certificado NAO e armazenado. So retorna a nota quando o titular do certificado e participante (emitente, destinatario, transportador ou autorizado). Cobra só quando retorna XML: nos planos Lite, Starter e Pro, cada XML conta como 3 consultas; no Enterprise, R$ 0,025 por nota, dentro das 10.000 consultas do plano. Chave sem XML não é cobrada.",
        "operationId": "consultar_nfe_xml_endpoint_api_consultar_nfe_xml_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NfeXmlRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NfeXmlResponse"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/consultar-nfe-xml-sem-certificado": {
      "post": {
        "tags": [
          "NF-e XML"
        ],
        "summary": "Consultar XML de NF-e por chave, sem certificado",
        "description": "Retorna o XML de UMA NF-e (modelo 55) a partir da chave de acesso, sem certificado digital. O XML é uma versão para leitura (`tipo_xml` = `leitura`, `assinado` = false): traz os dados da nota, mas não serve para validação de schema nem de assinatura. Para o XML assinado, use /api/consultar-nfe-xml, com certificado. Cobra o XML entregue e também a chave consultada cuja nota não foi encontrada (`nao_encontrado`). Chave inválida, `erro` e a mesma chave repetida logo depois de um `nao_encontrado` não são cobrados. Precisa de plano ou recarga.",
        "operationId": "consultar_nfe_xml_sem_certificado_endpoint_api_consultar_nfe_xml_sem_certificado_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NfeXmlSemCertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NfeXmlSemCertResponse"
                }
              }
            }
          },
          "402": {
            "description": "Saldo insuficiente para esta consulta. Assine um plano ou recarregue.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sefaz/status": {
      "get": {
        "tags": [
          "Monitor SEFAZ"
        ],
        "summary": "Status SEFAZ (autenticado)",
        "description": "Retorna o status atual de todas as SEFAZs estaduais. Requer API key. Dados atualizados a cada 2 minutos.",
        "operationId": "authenticated_sefaz_status_api_v1_sefaz_status_get",
        "parameters": [
          {
            "name": "doc",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "nfe",
                "nfce",
                "cte"
              ],
              "type": "string",
              "description": "Tipo de documento: nfe, nfce ou cte",
              "default": "nfe",
              "title": "Doc"
            },
            "description": "Tipo de documento: nfe, nfce ou cte"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rejeicoes": {
      "get": {
        "tags": [
          "Rejeições SEFAZ"
        ],
        "summary": "Listar rejeições SEFAZ",
        "description": "Retorna o catálogo de rejeições SEFAZ NFe com busca textual e filtro por categoria.",
        "operationId": "authenticated_list_rejeicoes_api_v1_rejeicoes_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Busca textual no motivo ou código",
              "title": "Q"
            },
            "description": "Busca textual no motivo ou código"
          },
          {
            "name": "categoria",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filtrar por categoria",
              "title": "Categoria"
            },
            "description": "Filtrar por categoria"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RejeicaoListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rejeicoes/{codigo}": {
      "get": {
        "tags": [
          "Rejeições SEFAZ"
        ],
        "summary": "Detalhe rejeição SEFAZ",
        "description": "Retorna detalhes de uma rejeição específica: motivo, causas e passos para resolver.",
        "operationId": "authenticated_detail_rejeicao_api_v1_rejeicoes__codigo__get",
        "parameters": [
          {
            "name": "codigo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Codigo"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RejeicaoDetailResponse"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    },
    "/api/saldo": {
      "get": {
        "tags": [
          "Saldo"
        ],
        "summary": "Consultar saldo restante",
        "description": "Retorna quanto o saldo da conta ainda rende, em consultas e em notas fiscais (XML de NF-e). As duas formas dividem o mesmo saldo: gastar notas reduz as consultas restantes e vice-versa. Não consome crédito.",
        "operationId": "consultar_saldo_api_saldo_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaldoResponse"
                }
              }
            }
          },
          "403": {
            "description": "Chave ausente, inválida ou revogada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Limite de requisições por minuto excedido. Veja o cabeçalho Retry-After.",
            "headers": {
              "Retry-After": {
                "description": "Segundos até poder tentar de novo.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroLimite"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroProblema"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CADINRegistro": {
        "properties": {
          "orgao_credor": {
            "type": "string",
            "title": "Orgao Credor",
            "default": ""
          },
          "valor_debito": {
            "type": "string",
            "title": "Valor Debito",
            "default": ""
          },
          "data_inscricao": {
            "type": "string",
            "title": "Data Inscricao",
            "default": ""
          },
          "tipo_pendencia": {
            "type": "string",
            "title": "Tipo Pendencia",
            "default": ""
          }
        },
        "type": "object",
        "title": "CADINRegistro"
      },
      "CADINResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CADINResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "CADINResponse"
      },
      "CADINResult": {
        "properties": {
          "inscrito": {
            "type": "boolean",
            "title": "Inscrito"
          },
          "total_pendencias": {
            "type": "integer",
            "title": "Total Pendencias",
            "default": 0
          },
          "registros": {
            "items": {
              "$ref": "#/components/schemas/CADINRegistro"
            },
            "type": "array",
            "title": "Registros",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "inscrito"
        ],
        "title": "CADINResult"
      },
      "CARRegistro": {
        "properties": {
          "numero_car": {
            "type": "string",
            "title": "Numero Car",
            "default": ""
          },
          "municipio": {
            "type": "string",
            "title": "Municipio",
            "default": ""
          },
          "uf": {
            "type": "string",
            "title": "Uf",
            "default": ""
          },
          "area_imovel_ha": {
            "type": "number",
            "title": "Area Imovel Ha",
            "default": 0.0
          },
          "area_reserva_legal_ha": {
            "type": "number",
            "title": "Area Reserva Legal Ha",
            "default": 0.0
          },
          "area_app_ha": {
            "type": "number",
            "title": "Area App Ha",
            "default": 0.0
          },
          "area_vegetacao_nativa_ha": {
            "type": "number",
            "title": "Area Vegetacao Nativa Ha",
            "default": 0.0
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": ""
          }
        },
        "type": "object",
        "title": "CARRegistro"
      },
      "CARResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CARResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "CARResponse"
      },
      "CARResult": {
        "properties": {
          "tem_car": {
            "type": "boolean",
            "title": "Tem Car"
          },
          "total_registros": {
            "type": "integer",
            "title": "Total Registros",
            "default": 0
          },
          "area_total_ha": {
            "type": "number",
            "title": "Area Total Ha",
            "default": 0.0
          },
          "area_vegetacao_total_ha": {
            "type": "number",
            "title": "Area Vegetacao Total Ha",
            "default": 0.0
          },
          "registros": {
            "items": {
              "$ref": "#/components/schemas/CARRegistro"
            },
            "type": "array",
            "title": "Registros",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "tem_car"
        ],
        "title": "CARResult"
      },
      "CNDResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "uf": {
            "type": "string",
            "title": "Uf"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CNDResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "uf",
          "source_status"
        ],
        "title": "CNDResponse",
        "examples": [
          {
            "cached": false,
            "document": "12345678000195",
            "document_type": "cnpj",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "result": {
              "emissao": "2026-03-13",
              "pdf_base64": "",
              "protocolo": "123456",
              "status": "negativa",
              "status_raw": "Certidão Negativa",
              "url_verificacao": "",
              "validade": "2026-09-13"
            },
            "source_status": {
              "error_code": "",
              "error_message": "",
              "status": "success"
            },
            "uf": "MT"
          }
        ]
      },
      "CNDResult": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "negativa",
              "positiva",
              "positiva_com_efeitos_de_negativa",
              "nao_contribuinte",
              "sem_certidao",
              "erro"
            ],
            "title": "Status"
          },
          "status_raw": {
            "type": "string",
            "title": "Status Raw",
            "default": ""
          },
          "validade": {
            "type": "string",
            "title": "Validade",
            "default": ""
          },
          "emissao": {
            "type": "string",
            "title": "Emissao",
            "default": ""
          },
          "protocolo": {
            "type": "string",
            "title": "Protocolo",
            "default": ""
          },
          "pdf_base64": {
            "type": "string",
            "title": "Pdf Base64",
            "default": ""
          },
          "url_verificacao": {
            "type": "string",
            "title": "Url Verificacao",
            "default": ""
          },
          "codigo_autenticacao": {
            "type": "string",
            "title": "Codigo Autenticacao",
            "default": ""
          },
          "validade_iso": {
            "type": "string",
            "title": "Validade Iso",
            "readOnly": true
          },
          "emissao_iso": {
            "type": "string",
            "title": "Emissao Iso",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "status",
          "validade_iso",
          "emissao_iso"
        ],
        "title": "CNDResult",
        "examples": [
          {
            "emissao": "2026-03-13",
            "pdf_base64": "",
            "protocolo": "123456",
            "status": "negativa",
            "status_raw": "Certidão Negativa",
            "url_verificacao": "",
            "validade": "2026-09-13"
          }
        ]
      },
      "CNPJResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "cnpj": {
            "type": "string",
            "title": "Cnpj"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CNPJResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "cnpj",
          "source_status"
        ],
        "title": "CNPJResponse",
        "examples": [
          {
            "cached": false,
            "cnpj": "12345678000195",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "result": {
              "nome_fantasia": "FAZENDA BOA VISTA",
              "razao_social": "AGROPECUARIA BOA VISTA LTDA",
              "situacao_cadastral": "ATIVA"
            },
            "source_status": {
              "error_code": "",
              "error_message": "",
              "status": "success"
            }
          }
        ]
      },
      "CNPJResult": {
        "properties": {
          "razao_social": {
            "type": "string",
            "title": "Razao Social",
            "default": ""
          },
          "nome_fantasia": {
            "type": "string",
            "title": "Nome Fantasia",
            "default": ""
          },
          "situacao_cadastral": {
            "type": "string",
            "title": "Situacao Cadastral",
            "default": ""
          },
          "data_situacao_cadastral": {
            "type": "string",
            "title": "Data Situacao Cadastral",
            "default": ""
          },
          "cnae_principal_codigo": {
            "type": "string",
            "title": "Cnae Principal Codigo",
            "default": ""
          },
          "cnae_principal_descricao": {
            "type": "string",
            "title": "Cnae Principal Descricao",
            "default": ""
          },
          "cnaes_secundarios": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Cnaes Secundarios",
            "default": []
          },
          "natureza_juridica": {
            "type": "string",
            "title": "Natureza Juridica",
            "default": ""
          },
          "capital_social": {
            "type": "string",
            "title": "Capital Social",
            "default": ""
          },
          "endereco": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Endereco",
            "default": {}
          },
          "qsa": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Qsa",
            "default": []
          },
          "porte": {
            "type": "string",
            "title": "Porte",
            "default": ""
          },
          "data_inicio_atividade": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Inicio Atividade",
            "description": "Data de abertura do estabelecimento (YYYY-MM-DD)."
          },
          "matriz_filial": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matriz Filial",
            "description": "MATRIZ ou FILIAL."
          },
          "motivo_situacao_cadastral": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Motivo Situacao Cadastral",
            "description": "Motivo da situacao cadastral, como publicado pela Receita Federal."
          },
          "situacao_especial": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Situacao Especial",
            "description": "Situacao especial (ex.: recuperacao judicial). None quando nao ha."
          },
          "data_situacao_especial": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Situacao Especial",
            "description": "Data da situacao especial (YYYY-MM-DD)."
          },
          "telefones": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telefones",
            "description": "Telefones do cadastro publico, DDD + numero, so digitos."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "E-mail do cadastro publico, como publicado."
          },
          "opcao_pelo_simples": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opcao Pelo Simples",
            "description": "Opcao pelo Simples Nacional, da base mensal da Receita Federal (nao e consulta ao vivo). None quando a base nao traz registro de opcao e na consulta ao vivo."
          },
          "data_opcao_pelo_simples": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Opcao Pelo Simples",
            "description": "Data da opcao pelo Simples Nacional (YYYY-MM-DD), da base mensal."
          },
          "data_exclusao_do_simples": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Exclusao Do Simples",
            "description": "Data da exclusao do Simples Nacional (YYYY-MM-DD), da base mensal."
          },
          "opcao_pelo_mei": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opcao Pelo Mei",
            "description": "Enquadramento no MEI, da base mensal da Receita Federal (nao e consulta ao vivo). None quando a base nao traz registro e na consulta ao vivo."
          },
          "data_opcao_pelo_mei": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Opcao Pelo Mei",
            "description": "Data do enquadramento no MEI (YYYY-MM-DD), da base mensal."
          },
          "data_exclusao_do_mei": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Exclusao Do Mei",
            "description": "Data do desenquadramento do MEI (YYYY-MM-DD), da base mensal."
          }
        },
        "type": "object",
        "title": "CNPJResult",
        "examples": [
          {
            "capital_social": "500000.00",
            "cnae_principal_codigo": "0151-2/01",
            "cnae_principal_descricao": "CRIACAO DE BOVINOS PARA CORTE",
            "cnaes_secundarios": [
              {
                "codigo": "0111-3/01",
                "descricao": "CULTIVO DE ARROZ"
              }
            ],
            "data_inicio_atividade": "2010-05-20",
            "data_opcao_pelo_simples": "2010-06-01",
            "data_situacao_cadastral": "2010-05-20",
            "endereco": {
              "bairro": "ZONA RURAL",
              "cep": "78000-000",
              "codigo_ibge": "5103403",
              "complemento": "GALPAO 2",
              "logradouro": "ROD BR-364 KM 28",
              "municipio": "CUIABA",
              "numero": "S/N",
              "uf": "MT"
            },
            "matriz_filial": "MATRIZ",
            "motivo_situacao_cadastral": "SEM MOTIVO",
            "natureza_juridica": "206-2 - Sociedade Empresaria Limitada",
            "nome_fantasia": "FAZENDA BOA VISTA",
            "opcao_pelo_mei": false,
            "opcao_pelo_simples": true,
            "porte": "PEQUENO PORTE",
            "qsa": [
              {
                "nome": "JOAO DA SILVA",
                "qualificacao": "Socio"
              }
            ],
            "razao_social": "AGROPECUARIA BOA VISTA LTDA",
            "situacao_cadastral": "ATIVA",
            "telefones": [
              "6500000000"
            ]
          }
        ]
      },
      "CertidaoFederalResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CertidaoFederalResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "CertidaoFederalResponse",
        "examples": [
          {
            "cached": false,
            "document": "12345678909",
            "document_type": "cpf",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "result": {
              "modo": "consulta",
              "orgao": "TST",
              "status": "negativa",
              "status_raw": "Certidao Negativa de Debitos Trabalhistas",
              "tipo": "cndt",
              "validade": "2026-09-13"
            },
            "source_status": {
              "error_code": "",
              "error_message": "",
              "status": "success"
            }
          }
        ]
      },
      "CertidaoFederalResult": {
        "properties": {
          "tipo": {
            "type": "string",
            "enum": [
              "cndt",
              "cnd_federal",
              "crf_fgts"
            ],
            "title": "Tipo"
          },
          "status": {
            "type": "string",
            "enum": [
              "negativa",
              "positiva",
              "positiva_com_efeitos_de_negativa",
              "nao_contribuinte",
              "sem_certidao",
              "erro"
            ],
            "title": "Status"
          },
          "status_raw": {
            "type": "string",
            "title": "Status Raw",
            "default": ""
          },
          "validade": {
            "type": "string",
            "title": "Validade",
            "default": ""
          },
          "emissao": {
            "type": "string",
            "title": "Emissao",
            "default": ""
          },
          "protocolo": {
            "type": "string",
            "title": "Protocolo",
            "default": ""
          },
          "pdf_base64": {
            "type": "string",
            "title": "Pdf Base64",
            "description": "PDF da certidao em base64: o documento emitido na consulta ou a segunda via de um ja emitido, conforme `modo`. Vazio quando o orgao nao emite (ex.: pendencias) ou quando a consulta foi consolidada (certidoes-todas).",
            "default": ""
          },
          "url_verificacao": {
            "type": "string",
            "title": "Url Verificacao",
            "default": ""
          },
          "orgao": {
            "type": "string",
            "title": "Orgao",
            "default": ""
          },
          "modo": {
            "type": "string",
            "enum": [
              "consulta",
              "emissao"
            ],
            "title": "Modo",
            "description": "Como o dado foi obtido no orgao. `consulta`: apenas verificamos e baixamos a segunda via de uma certidao que o orgao JA havia emitido — nenhum ato oficial novo foi praticado (se o status for `sem_certidao`, nao existe certidao emitida para o documento). `emissao`: o portal do orgao EMITE uma certidao nova, e o documento retornado e essa nova emissao. Hoje: crf_fgts e `consulta`; cndt e `emissao` (o TST emite o PDF na hora); cnd_federal devolve a certidao que ainda vale por mais de 3 dias (`consulta`) e so emite quando nao ha uma (`emissao`) -- com `emitir_nova=true`, sempre `emissao`.",
            "default": "emissao"
          },
          "validade_iso": {
            "type": "string",
            "title": "Validade Iso",
            "readOnly": true
          },
          "emissao_iso": {
            "type": "string",
            "title": "Emissao Iso",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "tipo",
          "status",
          "validade_iso",
          "emissao_iso"
        ],
        "title": "CertidaoFederalResult",
        "examples": [
          {
            "emissao": "2026-03-13",
            "modo": "consulta",
            "orgao": "TST",
            "pdf_base64": "JVBERi0xLjQK...",
            "protocolo": "123456",
            "status": "negativa",
            "status_raw": "Certidao Negativa de Debitos Trabalhistas",
            "tipo": "cndt",
            "url_verificacao": "",
            "validade": "2026-09-13"
          }
        ]
      },
      "CertidoesTodasResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cnd_estaduais": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CrossStateCNDResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "certidoes_federais": {
            "items": {
              "$ref": "#/components/schemas/CertidaoFederalResponse"
            },
            "type": "array",
            "title": "Certidoes Federais",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type"
        ],
        "title": "CertidoesTodasResponse",
        "examples": [
          {
            "certidoes_federais": [],
            "document": "12345678909",
            "document_type": "cpf",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        ]
      },
      "ChaveResultOut": {
        "properties": {
          "chave": {
            "type": "string",
            "title": "Chave"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "cstat": {
            "type": "string",
            "title": "Cstat",
            "default": ""
          },
          "mensagem": {
            "type": "string",
            "title": "Mensagem",
            "default": ""
          },
          "from_cache": {
            "type": "boolean",
            "title": "From Cache",
            "default": false
          },
          "manifestacao": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ciencia_registrada",
                  "ciencia_ja_registrada",
                  "ciencia_fora_prazo",
                  "ciencia_rejeitada",
                  "ciencia_erro",
                  "ciencia_nao_suportada",
                  "confirmacao_registrada",
                  "confirmacao_ja_registrada",
                  "confirmacao_rejeitada",
                  "confirmacao_erro",
                  "confirmacao_nao_suportada"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Manifestacao"
          },
          "xml": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Xml"
          }
        },
        "type": "object",
        "required": [
          "chave",
          "status"
        ],
        "title": "ChaveResultOut"
      },
      "ChaveResultSemCertOut": {
        "properties": {
          "chave": {
            "type": "string",
            "title": "Chave"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "mensagem": {
            "type": "string",
            "title": "Mensagem",
            "default": ""
          },
          "xml": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Xml"
          },
          "assinado": {
            "type": "boolean",
            "title": "Assinado",
            "default": false
          },
          "tipo_xml": {
            "type": "string",
            "const": "leitura",
            "title": "Tipo Xml",
            "default": "leitura"
          }
        },
        "type": "object",
        "required": [
          "chave",
          "status"
        ],
        "title": "ChaveResultSemCertOut"
      },
      "CnaeSecundario": {
        "properties": {
          "codigo": {
            "type": "string",
            "title": "Codigo"
          },
          "descricao": {
            "type": "string",
            "title": "Descricao",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "codigo"
        ],
        "title": "CnaeSecundario"
      },
      "CnirDadosTributarios": {
        "properties": {
          "indicador_descaracterizacao": {
            "type": "boolean",
            "title": "Indicador Descaracterizacao",
            "default": false
          },
          "origem_imovel": {
            "type": "integer",
            "title": "Origem Imovel",
            "default": 0
          },
          "data_aquisicao": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Aquisicao"
          },
          "area_adquirida": {
            "type": "number",
            "title": "Area Adquirida",
            "default": 0
          },
          "tipo_aquisicao": {
            "type": "string",
            "title": "Tipo Aquisicao",
            "default": ""
          },
          "imunidades": {
            "items": {
              "$ref": "#/components/schemas/CnirImunidade"
            },
            "type": "array",
            "title": "Imunidades",
            "default": []
          },
          "possui_decisao_judicial": {
            "type": "boolean",
            "title": "Possui Decisao Judicial",
            "default": false
          }
        },
        "type": "object",
        "title": "CnirDadosTributarios"
      },
      "CnirImovelCafir": {
        "properties": {
          "cib": {
            "type": "string",
            "title": "Cib",
            "default": ""
          },
          "nirf": {
            "type": "string",
            "title": "Nirf",
            "default": ""
          },
          "denominacao": {
            "type": "string",
            "title": "Denominacao",
            "default": ""
          },
          "area_total": {
            "type": "number",
            "title": "Area Total",
            "default": 0
          },
          "situacao": {
            "type": "string",
            "title": "Situacao",
            "default": ""
          },
          "codigo_situacao": {
            "type": "integer",
            "title": "Codigo Situacao",
            "default": 0
          },
          "ni_proprietario": {
            "type": "string",
            "title": "Ni Proprietario",
            "default": ""
          },
          "percentual_proprietario": {
            "type": "number",
            "title": "Percentual Proprietario",
            "default": 0
          },
          "condominos": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Condominos",
            "default": []
          },
          "dados_tributarios": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CnirDadosTributarios"
              },
              {
                "type": "null"
              }
            ]
          },
          "municipio_sede": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CnirMunicipioSede"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "CnirImovelCafir"
      },
      "CnirImunidade": {
        "properties": {
          "inicio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inicio"
          },
          "fim": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fim"
          },
          "motivo": {
            "type": "string",
            "title": "Motivo",
            "default": ""
          }
        },
        "type": "object",
        "title": "CnirImunidade"
      },
      "CnirMunicipioSede": {
        "properties": {
          "codigo": {
            "type": "string",
            "title": "Codigo",
            "default": ""
          },
          "uf": {
            "type": "string",
            "title": "Uf",
            "default": ""
          },
          "nome": {
            "type": "string",
            "title": "Nome",
            "default": ""
          }
        },
        "type": "object",
        "title": "CnirMunicipioSede"
      },
      "CnirPessoaFisica": {
        "properties": {
          "nome": {
            "type": "string",
            "title": "Nome",
            "default": ""
          },
          "data_nascimento": {
            "type": "string",
            "title": "Data Nascimento",
            "default": ""
          },
          "situacao_cadastral": {
            "type": "string",
            "title": "Situacao Cadastral",
            "default": ""
          },
          "sexo": {
            "type": "string",
            "title": "Sexo",
            "default": ""
          },
          "data_nascimento_iso": {
            "type": "string",
            "title": "Data Nascimento Iso",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "data_nascimento_iso"
        ],
        "title": "CnirPessoaFisica"
      },
      "CnirPessoaJuridica": {
        "properties": {
          "cnpj": {
            "type": "string",
            "title": "Cnpj",
            "default": ""
          },
          "razao_social": {
            "type": "string",
            "title": "Razao Social",
            "default": ""
          },
          "natureza_juridica": {
            "type": "string",
            "title": "Natureza Juridica",
            "default": ""
          },
          "situacao_cadastral": {
            "type": "string",
            "title": "Situacao Cadastral",
            "default": ""
          }
        },
        "type": "object",
        "title": "CnirPessoaJuridica"
      },
      "CnirResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "pessoa_fisica": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CnirPessoaFisica"
              },
              {
                "type": "null"
              }
            ]
          },
          "pessoa_juridica": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CnirPessoaJuridica"
              },
              {
                "type": "null"
              }
            ]
          },
          "imoveis_cafir": {
            "items": {
              "$ref": "#/components/schemas/CnirImovelCafir"
            },
            "type": "array",
            "title": "Imoveis Cafir",
            "default": []
          },
          "total_imoveis": {
            "type": "integer",
            "title": "Total Imoveis",
            "default": 0
          },
          "total_imoveis_ativos": {
            "type": "integer",
            "title": "Total Imoveis Ativos",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "CnirResponse"
      },
      "ConsultationResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "uf": {
            "type": "string",
            "title": "Uf",
            "default": ""
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "demo": {
            "type": "boolean",
            "title": "Demo",
            "default": false
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/IEResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "results"
        ],
        "title": "ConsultationResponse",
        "examples": [
          {
            "cached": false,
            "document": "12345678909",
            "document_type": "cpf",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "results": [
              {
                "cnae_codigo": "0111301",
                "cnae_descricao": "CULTIVO DE ARROZ",
                "cpf_cnpj": "123.456.789-09",
                "inscricao_estadual": "13.234.567-6",
                "municipio": "RONDONOPOLIS",
                "razao_social": "JOAO DA SILVA FAZENDA SANTA MARIA",
                "situacao_cadastral": "",
                "situacao_ie": "Habilitado",
                "tipo_ie": "IE de Produtor Rural",
                "uf_ie": "MT"
              }
            ],
            "uf": "MT"
          }
        ]
      },
      "CrossStateCNDResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/UFCNDResult"
            },
            "type": "array",
            "title": "Results",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type"
        ],
        "title": "CrossStateCNDResponse",
        "examples": [
          {
            "document": "12345678000195",
            "document_type": "cnpj",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "results": [
              {
                "result": {
                  "emissao": "2026-03-13",
                  "pdf_base64": "",
                  "protocolo": "123456",
                  "status": "negativa",
                  "status_raw": "Certidão Negativa",
                  "url_verificacao": "",
                  "validade": "2026-09-13"
                },
                "source_status": {
                  "error_code": "",
                  "error_message": "",
                  "status": "success"
                },
                "uf": "MT"
              }
            ]
          }
        ]
      },
      "CrossStateResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cached_ufs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Cached Ufs",
            "default": []
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/UFIEResult"
            },
            "type": "array",
            "title": "Results",
            "default": []
          },
          "complete": {
            "type": "boolean",
            "title": "Complete",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type"
        ],
        "title": "CrossStateResponse",
        "examples": [
          {
            "cached_ufs": [],
            "document": "12345678909",
            "document_type": "cpf",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "results": [
              {
                "results": [
                  {
                    "inscricao_estadual": "13.234.567-6",
                    "razao_social": "JOAO DA SILVA FAZENDA SANTA MARIA",
                    "situacao_ie": "Habilitado",
                    "uf_ie": "MT"
                  }
                ],
                "source_status": {
                  "status": "success"
                },
                "uf": "MT"
              },
              {
                "results": [],
                "source_status": {
                  "status": "success"
                },
                "uf": "RO"
              }
            ]
          }
        ]
      },
      "EmbargoIbamaRegistro": {
        "properties": {
          "seq_tad": {
            "type": "string",
            "title": "Seq Tad"
          },
          "num_processo": {
            "type": "string",
            "title": "Num Processo"
          },
          "natureza": {
            "type": "string",
            "title": "Natureza"
          },
          "area_embargada_ha": {
            "type": "number",
            "title": "Area Embargada Ha"
          },
          "data_embargo": {
            "type": "string",
            "title": "Data Embargo"
          },
          "data_desembargo": {
            "type": "string",
            "title": "Data Desembargo",
            "default": ""
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "municipio": {
            "type": "string",
            "title": "Municipio"
          },
          "uf": {
            "type": "string",
            "title": "Uf"
          },
          "nome_imovel": {
            "type": "string",
            "title": "Nome Imovel"
          },
          "latitude": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latitude"
          },
          "longitude": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Longitude"
          }
        },
        "type": "object",
        "required": [
          "seq_tad",
          "num_processo",
          "natureza",
          "area_embargada_ha",
          "data_embargo",
          "status",
          "municipio",
          "uf",
          "nome_imovel"
        ],
        "title": "EmbargoIbamaRegistro"
      },
      "EmbargoIbamaResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbargoIbamaResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "EmbargoIbamaResponse"
      },
      "EmbargoIbamaResult": {
        "properties": {
          "tem_embargos": {
            "type": "boolean",
            "title": "Tem Embargos"
          },
          "total_embargos": {
            "type": "integer",
            "title": "Total Embargos",
            "default": 0
          },
          "total_embargos_ativos": {
            "type": "integer",
            "title": "Total Embargos Ativos",
            "default": 0
          },
          "area_total_embargada_ha": {
            "type": "number",
            "title": "Area Total Embargada Ha",
            "default": 0.0
          },
          "ultima_atualizacao": {
            "type": "string",
            "title": "Ultima Atualizacao",
            "default": ""
          },
          "registros": {
            "items": {
              "$ref": "#/components/schemas/EmbargoIbamaRegistro"
            },
            "type": "array",
            "title": "Registros",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "tem_embargos"
        ],
        "title": "EmbargoIbamaResult"
      },
      "ErroLimite": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "LIMITE_ATINGIDO",
            "description": "Código do erro: LIMITE_ATINGIDO (402); RATE_LIMIT_EXCEEDED ou LIMITE_FALHAS_DIARIO (429)."
          },
          "message": {
            "type": "string",
            "description": "Mensagem para o usuário."
          },
          "plan": {
            "type": "string",
            "description": "Plano da conta."
          },
          "usage": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "extra_credits": {
            "type": "integer"
          },
          "cost": {
            "type": "integer",
            "description": "Créditos que esta consulta custaria."
          },
          "consultas_restantes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Quantas consultas deste tipo o saldo ainda paga."
          },
          "free_queries_used": {
            "type": "integer",
            "description": "Consultas grátis do mês já usadas (só quando a cota acabou)."
          },
          "free_queries_limit": {
            "type": "integer",
            "description": "Consultas grátis por mês."
          },
          "free_queries_renew_on": {
            "type": "string",
            "description": "Dia em que a cota grátis renova (DD/MM/AAAA)."
          },
          "retry_after": {
            "type": "integer",
            "description": "Segundos até poder tentar de novo (429)."
          }
        },
        "additionalProperties": true
      },
      "ErroProblema": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "example": "urn:fiscalapi:error:limite_atingido"
          },
          "title": {
            "type": "string",
            "description": "Código do erro.",
            "example": "LIMITE_ATINGIDO"
          },
          "status": {
            "type": "integer",
            "example": 402
          },
          "detail": {
            "type": "string",
            "description": "Mensagem para o usuário."
          },
          "instance": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "type": "string",
            "description": "Plano da conta."
          },
          "cost": {
            "type": "integer",
            "description": "Créditos que esta consulta custaria."
          },
          "consultas_restantes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "retry_after": {
            "type": "integer",
            "description": "Segundos até poder tentar de novo (429)."
          }
        },
        "additionalProperties": true
      },
      "ErrorResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "error": {
            "type": "string",
            "title": "Error"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "error",
          "message"
        ],
        "title": "ErrorResponse",
        "examples": [
          {
            "error": "PARAMETRO_AUSENTE",
            "message": "Informe cpf, cnpj ou ie",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        ]
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IEResult": {
        "properties": {
          "inscricao_estadual": {
            "type": "string",
            "title": "Inscricao Estadual"
          },
          "razao_social": {
            "type": "string",
            "title": "Razao Social",
            "default": ""
          },
          "nome_fantasia": {
            "type": "string",
            "title": "Nome Fantasia",
            "default": ""
          },
          "situacao_ie": {
            "type": "string",
            "title": "Situacao Ie",
            "default": ""
          },
          "uf_ie": {
            "type": "string",
            "title": "Uf Ie",
            "default": ""
          },
          "tipo_ie": {
            "type": "string",
            "title": "Tipo Ie",
            "default": ""
          },
          "logradouro": {
            "type": "string",
            "title": "Logradouro",
            "default": ""
          },
          "complemento": {
            "type": "string",
            "title": "Complemento",
            "default": ""
          },
          "bairro": {
            "type": "string",
            "title": "Bairro",
            "default": ""
          },
          "numero": {
            "type": "string",
            "title": "Numero",
            "default": ""
          },
          "municipio": {
            "type": "string",
            "title": "Municipio",
            "default": ""
          },
          "municipio_ibge": {
            "type": "string",
            "title": "Municipio Ibge",
            "default": ""
          },
          "cep": {
            "type": "string",
            "title": "Cep",
            "default": ""
          },
          "regime_pagamento": {
            "type": "string",
            "title": "Regime Pagamento",
            "default": ""
          },
          "data_situacao": {
            "type": "string",
            "title": "Data Situacao",
            "default": ""
          },
          "situacao_contribuinte": {
            "type": "string",
            "title": "Situacao Contribuinte",
            "default": ""
          },
          "data_inicio_atividade": {
            "type": "string",
            "title": "Data Inicio Atividade",
            "default": ""
          },
          "cnae_codigo": {
            "type": "string",
            "title": "Cnae Codigo",
            "default": ""
          },
          "cnae_descricao": {
            "type": "string",
            "title": "Cnae Descricao",
            "default": ""
          },
          "regime_apuracao_icms": {
            "type": "string",
            "title": "Regime Apuracao Icms",
            "default": ""
          },
          "situacao_nfe": {
            "type": "string",
            "title": "Situacao Nfe",
            "default": ""
          },
          "cpf_cnpj": {
            "type": "string",
            "title": "Cpf Cnpj",
            "default": ""
          },
          "situacao_cadastral": {
            "type": "string",
            "title": "Situacao Cadastral",
            "default": ""
          },
          "cnaes_secundarios": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CnaeSecundario"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cnaes Secundarios",
            "description": "Atividades econômicas secundárias da inscrição. `null` = não informado nesta consulta (o estado ainda não é coberto ou o dado não pôde ser obtido); `[]` = o estado informou que a inscrição não tem atividade secundária."
          },
          "data_situacao_iso": {
            "type": "string",
            "title": "Data Situacao Iso",
            "readOnly": true
          },
          "data_inicio_atividade_iso": {
            "type": "string",
            "title": "Data Inicio Atividade Iso",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "inscricao_estadual",
          "data_situacao_iso",
          "data_inicio_atividade_iso"
        ],
        "title": "IEResult",
        "examples": [
          {
            "bairro": "ZONA RURAL",
            "cep": "78700-000",
            "cnae_codigo": "0111301",
            "cnae_descricao": "CULTIVO DE ARROZ",
            "complemento": "ZONA RURAL",
            "cpf_cnpj": "123.456.789-09",
            "data_inicio_atividade": "01/06/2015",
            "data_situacao": "15/03/2020",
            "inscricao_estadual": "13.234.567-6",
            "logradouro": "ROD MT-130 KM 42",
            "municipio": "RONDONOPOLIS",
            "municipio_ibge": "5107602",
            "nome_fantasia": "FAZENDA SANTA MARIA",
            "numero": "S/N",
            "razao_social": "JOAO DA SILVA FAZENDA SANTA MARIA",
            "regime_apuracao_icms": "NORMAL",
            "regime_pagamento": "NORMAL",
            "situacao_cadastral": "",
            "situacao_contribuinte": "Sem restrição",
            "situacao_ie": "Habilitado",
            "situacao_nfe": "NFe",
            "tipo_ie": "IE de Produtor Rural",
            "uf_ie": "MT"
          }
        ]
      },
      "ListaSujaRegistro": {
        "properties": {
          "razao_social": {
            "type": "string",
            "title": "Razao Social"
          },
          "uf": {
            "type": "string",
            "title": "Uf"
          },
          "municipio": {
            "type": "string",
            "title": "Municipio"
          },
          "ano_acao_fiscal": {
            "type": "integer",
            "title": "Ano Acao Fiscal"
          },
          "data_inclusao": {
            "type": "string",
            "title": "Data Inclusao"
          },
          "trabalhadores_envolvidos": {
            "type": "integer",
            "title": "Trabalhadores Envolvidos"
          },
          "cnae": {
            "type": "string",
            "title": "Cnae"
          },
          "estabelecimento": {
            "type": "string",
            "title": "Estabelecimento"
          }
        },
        "type": "object",
        "required": [
          "razao_social",
          "uf",
          "municipio",
          "ano_acao_fiscal",
          "data_inclusao",
          "trabalhadores_envolvidos",
          "cnae",
          "estabelecimento"
        ],
        "title": "ListaSujaRegistro"
      },
      "ListaSujaResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListaSujaResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "ListaSujaResponse"
      },
      "ListaSujaResult": {
        "properties": {
          "presente": {
            "type": "boolean",
            "title": "Presente"
          },
          "total_registros": {
            "type": "integer",
            "title": "Total Registros",
            "default": 0
          },
          "ultima_atualizacao": {
            "type": "string",
            "title": "Ultima Atualizacao",
            "default": ""
          },
          "registros": {
            "items": {
              "$ref": "#/components/schemas/ListaSujaRegistro"
            },
            "type": "array",
            "title": "Registros",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "presente"
        ],
        "title": "ListaSujaResult"
      },
      "NfeXmlRequest": {
        "properties": {
          "chave": {
            "type": "string",
            "title": "Chave",
            "description": "Chave de acesso (44 posicoes). Aceita CNPJ alfanumerico do emitente (letras A-Z nas posicoes 7 a 18); separadores sao ignorados."
          },
          "certificado": {
            "type": "string",
            "maxLength": 140000,
            "title": "Certificado",
            "description": "Binario do .pfx em base64 (ate 100 KB)"
          },
          "senha": {
            "type": "string",
            "title": "Senha",
            "description": "Senha do certificado"
          },
          "manifestar": {
            "type": "boolean",
            "title": "Manifestar",
            "description": "Quando a SEFAZ devolve so o resumo (destinatario sem manifestacao), registrar a manifestacao do destinatario com este certificado para liberar o XML (Ciencia da Operacao ate 10 dias; depois, portal e Confirmacao da Operacao). false = devolve somente_resumo sem registrar nenhum evento.",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "chave",
          "certificado",
          "senha"
        ],
        "title": "NfeXmlRequest"
      },
      "NfeXmlResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "com_dado": {
            "type": "integer",
            "title": "Com Dado"
          },
          "creditos_cobrados": {
            "type": "integer",
            "title": "Creditos Cobrados"
          },
          "resultados": {
            "items": {
              "$ref": "#/components/schemas/ChaveResultOut"
            },
            "type": "array",
            "title": "Resultados"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "total",
          "com_dado",
          "creditos_cobrados",
          "resultados"
        ],
        "title": "NfeXmlResponse"
      },
      "NfeXmlSemCertRequest": {
        "properties": {
          "chave": {
            "type": "string",
            "title": "Chave",
            "description": "Chave de acesso da NF-e (44 posicoes, modelo 55). Aceita CNPJ alfanumerico do emitente; separadores sao ignorados."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chave"
        ],
        "title": "NfeXmlSemCertRequest"
      },
      "NfeXmlSemCertResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "com_dado": {
            "type": "integer",
            "title": "Com Dado"
          },
          "creditos_cobrados": {
            "type": "integer",
            "title": "Creditos Cobrados"
          },
          "resultados": {
            "items": {
              "$ref": "#/components/schemas/ChaveResultSemCertOut"
            },
            "type": "array",
            "title": "Resultados"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "total",
          "com_dado",
          "creditos_cobrados",
          "resultados"
        ],
        "title": "NfeXmlSemCertResponse"
      },
      "ProducerProfile": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "receita_federal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CNPJResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "inscricoes_estaduais": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CrossStateResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "cnd_estaduais": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CrossStateCNDResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "certidoes_federais": {
            "items": {
              "$ref": "#/components/schemas/CertidaoFederalResponse"
            },
            "type": "array",
            "title": "Certidoes Federais",
            "default": []
          },
          "cnir": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CnirResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "lista_suja": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListaSujaResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "embargos_ibama": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbargoIbamaResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "car": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CARResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "cadin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CADINResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document"
        ],
        "title": "ProducerProfile",
        "examples": [
          {
            "document": "12345678000195",
            "inscricoes_estaduais": {
              "document": "12345678000195",
              "document_type": "cnpj",
              "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "results": [
                {
                  "results": [
                    {
                      "inscricao_estadual": "13.234.567-6",
                      "razao_social": "JOAO DA SILVA FAZENDA SANTA MARIA"
                    }
                  ],
                  "source_status": {
                    "status": "success"
                  },
                  "uf": "MT"
                }
              ]
            },
            "receita_federal": {
              "cached": false,
              "cnpj": "12345678000195",
              "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "result": {
                "razao_social": "AGROPECUARIA BOA VISTA LTDA"
              },
              "source_status": {
                "status": "success"
              }
            },
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        ]
      },
      "RejeicaoDetailResponse": {
        "properties": {
          "codigo": {
            "type": "integer",
            "title": "Codigo"
          },
          "titulo": {
            "type": "string",
            "title": "Titulo"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "motivo": {
            "type": "string",
            "title": "Motivo"
          },
          "categoria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categoria"
          },
          "url_blog": {
            "type": "string",
            "title": "Url Blog"
          },
          "causas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Causas",
            "default": []
          },
          "solucao_passos": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Solucao Passos",
            "default": []
          },
          "verificacoes_analiticas": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Verificacoes Analiticas",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "codigo",
          "titulo",
          "slug",
          "motivo",
          "url_blog"
        ],
        "title": "RejeicaoDetailResponse"
      },
      "RejeicaoItem": {
        "properties": {
          "codigo": {
            "type": "integer",
            "title": "Codigo"
          },
          "titulo": {
            "type": "string",
            "title": "Titulo"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "motivo": {
            "type": "string",
            "title": "Motivo"
          },
          "categoria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categoria"
          },
          "url_blog": {
            "type": "string",
            "title": "Url Blog"
          }
        },
        "type": "object",
        "required": [
          "codigo",
          "titulo",
          "slug",
          "motivo",
          "url_blog"
        ],
        "title": "RejeicaoItem"
      },
      "RejeicaoListResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/RejeicaoItem"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "total",
          "page",
          "page_size",
          "results"
        ],
        "title": "RejeicaoListResponse"
      },
      "SaldoResponse": {
        "properties": {
          "consultas_restantes": {
            "type": "integer",
            "title": "Consultas Restantes",
            "description": "Quantas consultas (IE, CNPJ, certidões etc.) o saldo ainda paga."
          },
          "notas_restantes": {
            "type": "integer",
            "title": "Notas Restantes",
            "description": "Quantos XML de NF-e o saldo ainda paga."
          }
        },
        "type": "object",
        "required": [
          "consultas_restantes",
          "notas_restantes"
        ],
        "title": "SaldoResponse",
        "examples": [
          {
            "consultas_restantes": 1500,
            "notas_restantes": 500
          }
        ]
      },
      "SigefConfrontante": {
        "properties": {
          "do_vertice": {
            "type": "string",
            "title": "Do Vertice",
            "default": ""
          },
          "ao_vertice": {
            "type": "string",
            "title": "Ao Vertice",
            "default": ""
          },
          "descricao": {
            "type": "string",
            "title": "Descricao",
            "default": ""
          },
          "cns": {
            "type": "string",
            "title": "Cns",
            "default": ""
          },
          "matricula": {
            "type": "string",
            "title": "Matricula",
            "default": ""
          },
          "ocupante": {
            "type": "string",
            "title": "Ocupante",
            "default": ""
          },
          "lado": {
            "type": "string",
            "title": "Lado",
            "default": ""
          },
          "tipo_limite": {
            "type": "string",
            "title": "Tipo Limite",
            "default": ""
          },
          "azimute": {
            "type": "string",
            "title": "Azimute",
            "default": ""
          },
          "comprimento_m": {
            "type": "number",
            "title": "Comprimento M",
            "default": 0.0
          },
          "indice": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indice"
          },
          "azimute_decimal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Azimute Decimal"
          },
          "geometria_wkt": {
            "type": "string",
            "title": "Geometria Wkt",
            "default": ""
          }
        },
        "type": "object",
        "title": "SigefConfrontante"
      },
      "SigefParcela": {
        "properties": {
          "parcel_id": {
            "type": "string",
            "title": "Parcel Id",
            "default": ""
          },
          "codigo_parcela": {
            "type": "string",
            "title": "Codigo Parcela",
            "default": ""
          },
          "denominacao": {
            "type": "string",
            "title": "Denominacao",
            "default": ""
          },
          "area_ha": {
            "type": "number",
            "title": "Area Ha",
            "default": 0.0
          },
          "municipio": {
            "type": "string",
            "title": "Municipio",
            "default": ""
          },
          "uf": {
            "type": "string",
            "title": "Uf",
            "default": ""
          },
          "codigo_ibge": {
            "type": "string",
            "title": "Codigo Ibge",
            "default": ""
          },
          "detentor": {
            "type": "string",
            "title": "Detentor",
            "default": ""
          },
          "matricula": {
            "type": "string",
            "title": "Matricula",
            "default": ""
          },
          "cns": {
            "type": "string",
            "title": "Cns",
            "default": ""
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": ""
          },
          "data_certificacao": {
            "type": "string",
            "title": "Data Certificacao",
            "default": ""
          },
          "data_entrada": {
            "type": "string",
            "title": "Data Entrada",
            "default": ""
          },
          "natureza": {
            "type": "string",
            "title": "Natureza",
            "default": ""
          },
          "codigo_sncr": {
            "type": "string",
            "title": "Codigo Sncr",
            "default": ""
          },
          "cartorio": {
            "type": "string",
            "title": "Cartorio",
            "default": ""
          },
          "imovel_situacao": {
            "type": "string",
            "title": "Imovel Situacao",
            "default": ""
          },
          "num_parcelas_imovel": {
            "type": "integer",
            "title": "Num Parcelas Imovel",
            "default": 0
          },
          "registro_situacao": {
            "type": "string",
            "title": "Registro Situacao",
            "default": ""
          },
          "responsavel_tecnico": {
            "type": "string",
            "title": "Responsavel Tecnico",
            "default": ""
          },
          "rt_documento": {
            "type": "string",
            "title": "Rt Documento",
            "default": ""
          },
          "requerimentos": {
            "items": {
              "$ref": "#/components/schemas/SigefRequerimento"
            },
            "type": "array",
            "title": "Requerimentos",
            "default": []
          },
          "confrontantes": {
            "items": {
              "$ref": "#/components/schemas/SigefConfrontante"
            },
            "type": "array",
            "title": "Confrontantes",
            "default": []
          },
          "vertices": {
            "items": {
              "$ref": "#/components/schemas/SigefVertice"
            },
            "type": "array",
            "title": "Vertices",
            "default": []
          },
          "centroid_lat": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Centroid Lat"
          },
          "centroid_lng": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Centroid Lng"
          },
          "perimetro_m": {
            "type": "number",
            "title": "Perimetro M",
            "default": 0.0
          },
          "bbox_min_lat": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bbox Min Lat"
          },
          "bbox_min_lng": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bbox Min Lng"
          },
          "bbox_max_lat": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bbox Max Lat"
          },
          "bbox_max_lng": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bbox Max Lng"
          },
          "geometria_wkt": {
            "type": "string",
            "title": "Geometria Wkt",
            "default": ""
          },
          "data_certificacao_iso": {
            "type": "string",
            "title": "Data Certificacao Iso",
            "readOnly": true
          },
          "data_entrada_iso": {
            "type": "string",
            "title": "Data Entrada Iso",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "data_certificacao_iso",
          "data_entrada_iso"
        ],
        "title": "SigefParcela",
        "examples": [
          {
            "area_ha": 120.55,
            "cartorio": "Primeiro Servico Notarial e Registral",
            "cns": "00.000-0",
            "codigo_ibge": "5106752",
            "codigo_parcela": "ABC123-4567",
            "codigo_sncr": "0000000000000",
            "data_certificacao": "2022-03-15",
            "data_entrada": "10/05/2021",
            "denominacao": "Fazenda Boa Vista",
            "detentor": "JOAO DA SILVA",
            "matricula": "12345",
            "municipio": "Pontes e Lacerda",
            "natureza": "Particular",
            "parcel_id": "00000000-0000-4000-8000-000000000001",
            "status": "Certificada - Com Registro em Cartorio Confirmado",
            "uf": "MT"
          }
        ]
      },
      "SigefParcelaResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "parcel_id": {
            "type": "string",
            "title": "Parcel Id"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "consultado_em": {
            "type": "string",
            "title": "Consultado Em",
            "default": ""
          },
          "completo": {
            "type": "boolean",
            "title": "Completo",
            "default": true
          },
          "avisos": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Avisos",
            "default": []
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SigefParcela"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "parcel_id",
          "source_status"
        ],
        "title": "SigefParcelaResponse",
        "examples": [
          {
            "avisos": [],
            "cached": false,
            "completo": true,
            "consultado_em": "2026-10-18T14:05:12Z",
            "parcel_id": "00000000-0000-4000-8000-000000000002",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "result": {
              "parcel_id": "00000000-0000-4000-8000-000000000002"
            },
            "source_status": {
              "status": "success"
            }
          }
        ]
      },
      "SigefRequerimento": {
        "properties": {
          "tipo": {
            "type": "string",
            "title": "Tipo",
            "default": ""
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": ""
          },
          "data": {
            "type": "string",
            "title": "Data",
            "default": ""
          }
        },
        "type": "object",
        "title": "SigefRequerimento"
      },
      "SigefResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "document": {
            "type": "string",
            "title": "Document"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "default": false
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SigefResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "document",
          "document_type",
          "source_status"
        ],
        "title": "SigefResponse",
        "examples": [
          {
            "cached": false,
            "document": "12345678909",
            "document_type": "cpf",
            "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "result": {
              "area_total_ha": 50.0,
              "parcelas": [],
              "total_parcelas": 1
            },
            "source_status": {
              "status": "success"
            }
          }
        ]
      },
      "SigefResult": {
        "properties": {
          "total_parcelas": {
            "type": "integer",
            "title": "Total Parcelas",
            "default": 0
          },
          "area_total_ha": {
            "type": "number",
            "title": "Area Total Ha",
            "default": 0.0
          },
          "parcelas": {
            "items": {
              "$ref": "#/components/schemas/SigefParcela"
            },
            "type": "array",
            "title": "Parcelas",
            "default": []
          }
        },
        "type": "object",
        "title": "SigefResult",
        "examples": [
          {
            "area_total_ha": 241.1,
            "parcelas": [],
            "total_parcelas": 2
          }
        ]
      },
      "SigefVertice": {
        "properties": {
          "codigo": {
            "type": "string",
            "title": "Codigo",
            "default": ""
          },
          "longitude": {
            "type": "string",
            "title": "Longitude",
            "default": ""
          },
          "latitude": {
            "type": "string",
            "title": "Latitude",
            "default": ""
          },
          "longitude_decimal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Longitude Decimal"
          },
          "latitude_decimal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latitude Decimal"
          },
          "altitude_m": {
            "type": "number",
            "title": "Altitude M",
            "default": 0.0
          },
          "metodo": {
            "type": "string",
            "title": "Metodo",
            "default": ""
          },
          "indice": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indice"
          },
          "tipo": {
            "type": "string",
            "title": "Tipo",
            "default": ""
          },
          "lado": {
            "type": "string",
            "title": "Lado",
            "default": ""
          },
          "sigma_x_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sigma X M"
          },
          "sigma_y_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sigma Y M"
          },
          "sigma_z_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sigma Z M"
          }
        },
        "type": "object",
        "title": "SigefVertice"
      },
      "SimplesNacionalEventoFuturo": {
        "properties": {
          "regime": {
            "type": "string",
            "title": "Regime"
          },
          "descricao": {
            "type": "string",
            "title": "Descricao"
          },
          "data_efeito": {
            "type": "string",
            "title": "Data Efeito"
          }
        },
        "type": "object",
        "required": [
          "regime",
          "descricao",
          "data_efeito"
        ],
        "title": "SimplesNacionalEventoFuturo"
      },
      "SimplesNacionalMaisInfo": {
        "properties": {
          "opcoes_periodos_anteriores": {
            "type": "string",
            "title": "Opcoes Periodos Anteriores",
            "default": ""
          },
          "enquadramentos_simei_periodos_anteriores": {
            "type": "string",
            "title": "Enquadramentos Simei Periodos Anteriores",
            "default": ""
          },
          "eventos_futuros_simples": {
            "type": "string",
            "title": "Eventos Futuros Simples",
            "default": ""
          },
          "eventos_futuros_simei": {
            "type": "string",
            "title": "Eventos Futuros Simei",
            "default": ""
          },
          "mei_tac": {
            "type": "string",
            "title": "Mei Tac",
            "default": ""
          }
        },
        "type": "object",
        "title": "SimplesNacionalMaisInfo"
      },
      "SimplesNacionalResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "cnpj": {
            "type": "string",
            "title": "Cnpj"
          },
          "cnpj_matriz": {
            "type": "string",
            "title": "Cnpj Matriz",
            "description": "CNPJ matriz — para filiais, a situação mostrada é a da matriz (a opção abrange todos os estabelecimentos)"
          },
          "nome_empresarial": {
            "type": "string",
            "title": "Nome Empresarial"
          },
          "data_consulta": {
            "type": "string",
            "title": "Data Consulta"
          },
          "situacao_simples": {
            "type": "string",
            "title": "Situacao Simples"
          },
          "optante_simples": {
            "type": "boolean",
            "title": "Optante Simples"
          },
          "data_opcao_simples": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Opcao Simples"
          },
          "situacao_simei": {
            "type": "string",
            "title": "Situacao Simei"
          },
          "enquadrado_simei": {
            "type": "boolean",
            "title": "Enquadrado Simei"
          },
          "regime_regular_ibs": {
            "type": "string",
            "title": "Regime Regular Ibs"
          },
          "regime_regular_cbs": {
            "type": "string",
            "title": "Regime Regular Cbs"
          },
          "eventos_futuros": {
            "items": {
              "$ref": "#/components/schemas/SimplesNacionalEventoFuturo"
            },
            "type": "array",
            "title": "Eventos Futuros",
            "default": []
          },
          "mais_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimplesNacionalMaisInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "cached": {
            "type": "boolean",
            "title": "Cached",
            "description": "True quando a resposta veio do cache (TTL configurável)"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "cnpj",
          "cnpj_matriz",
          "nome_empresarial",
          "data_consulta",
          "situacao_simples",
          "optante_simples",
          "situacao_simei",
          "enquadrado_simei",
          "regime_regular_ibs",
          "regime_regular_cbs",
          "cached"
        ],
        "title": "SimplesNacionalResponse"
      },
      "SourceStatus": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "error",
              "timeout",
              "skipped"
            ],
            "title": "Status"
          },
          "error_code": {
            "type": "string",
            "title": "Error Code",
            "default": ""
          },
          "error_message": {
            "type": "string",
            "title": "Error Message"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "SourceStatus",
        "examples": [
          {
            "error_code": "",
            "error_message": "",
            "status": "success"
          }
        ]
      },
      "UFCNDResult": {
        "properties": {
          "uf": {
            "type": "string",
            "title": "Uf"
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CNDResult"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "uf",
          "source_status"
        ],
        "title": "UFCNDResult",
        "examples": [
          {
            "result": {
              "emissao": "2026-03-13",
              "pdf_base64": "",
              "protocolo": "123456",
              "status": "negativa",
              "status_raw": "Certidão Negativa",
              "url_verificacao": "",
              "validade": "2026-09-13"
            },
            "source_status": {
              "error_code": "",
              "error_message": "",
              "status": "success"
            },
            "uf": "MT"
          }
        ]
      },
      "UFIEResult": {
        "properties": {
          "uf": {
            "type": "string",
            "title": "Uf"
          },
          "source_status": {
            "$ref": "#/components/schemas/SourceStatus"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/IEResult"
            },
            "type": "array",
            "title": "Results",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "uf",
          "source_status"
        ],
        "title": "UFIEResult",
        "examples": [
          {
            "results": [
              {
                "inscricao_estadual": "13.234.567-6",
                "razao_social": "JOAO DA SILVA FAZENDA SANTA MARIA",
                "situacao_ie": "Habilitado",
                "uf_ie": "MT"
              }
            ],
            "source_status": {
              "error_code": "",
              "error_message": "",
              "status": "success"
            },
            "uf": "MT"
          }
        ]
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Chave da API, criada no painel da FiscalAPI."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Consulta IE",
      "description": "Inscrição estadual em um estado, por CPF, CNPJ ou IE."
    },
    {
      "name": "Enriquecimento",
      "description": "CNPJ, inscrições estaduais em todos os estados e perfil completo do produtor."
    },
    {
      "name": "CND Estadual",
      "description": "Certidão negativa de débitos estadual (ICMS)."
    },
    {
      "name": "Certidoes Federais",
      "description": "Certidões federais: CNDT, CND Federal e CRF do FGTS."
    },
    {
      "name": "CNIR",
      "description": "Imóveis rurais vinculados a um CPF ou CNPJ."
    },
    {
      "name": "SIGEF",
      "description": "Parcelas georreferenciadas de imóveis rurais."
    },
    {
      "name": "Simples Nacional",
      "description": "Situação no Simples Nacional e no MEI."
    },
    {
      "name": "NF-e XML",
      "description": "XML da NF-e pela chave de acesso, com o seu certificado digital ou sem certificado."
    },
    {
      "name": "Saldo",
      "description": "Saldo restante da conta."
    },
    {
      "name": "Monitor SEFAZ",
      "description": "Status das SEFAZs estaduais."
    },
    {
      "name": "Rejeições SEFAZ",
      "description": "Catálogo de rejeições da NF-e com causas e solução."
    }
  ]
}
