Sudrel · Schema

Nfse

FinanceInvoicingBrazilSoftware-as-a-Service

Properties

Name Type Description
id string
referencia stringnull
status string
empresa_id string
ambiente string `sandbox` = emitida com chave de teste, no ambiente de testes do Sistema Nacional, sem valor fiscal.
simulacao stringnull Cenário do simulador de falhas (`X-Sudrel-Simular`); `null` em nota de verdade. Nota simulada nunca foi à Sefin.
origem string
numero stringnull
chave_acesso stringnull
dps objectnull
valor object
tomador object
servico object
retencoes object
apuracao_propria object
iss object
rejeicao objectnull
falha objectnull Só em `falha_transmissao`.
cancelamento objectnull
recuperada_em stringnull
substituicao objectnull Nesta nota (a nova), qual NFS-e ela substitui.
substituida_por objectnull Nesta nota (a original, agora `cancelada` pelo Sistema Nacional), qual a substituiu.
confirmacao objectnull Só em `aguardando_confirmacao`.
aviso objectnull Só em `transmitindo`, depois de 30 minutos.
ajustes array
eventos array
regras_versao string Versões do catálogo de correções automáticas e do catálogo de regras de campo que decidiram esta nota, nessa ordem.
criada_em string
atualizada_em string
links object
View JSON Schema on GitHub

JSON Schema

sudrel-com-br-nfse-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudrel-com-br/json-schema/sudrel-com-br-nfse-schema.json",
  "title": "Nfse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudrel-com-br-openapi.yml#/components/schemas/Nfse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "referencia": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "transmitindo",
        "autorizada",
        "rejeitada",
        "cancelada",
        "falha_transmissao",
        "descartada",
        "aguardando_confirmacao"
      ]
    },
    "empresa_id": {
      "type": "string"
    },
    "ambiente": {
      "type": "string",
      "enum": [
        "producao",
        "sandbox"
      ],
      "description": "`sandbox` = emitida com chave de teste, no ambiente de testes do Sistema Nacional, sem valor fiscal."
    },
    "simulacao": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cenário do simulador de falhas (`X-Sudrel-Simular`); `null` em nota de verdade. Nota simulada nunca foi à Sefin."
    },
    "origem": {
      "type": "string",
      "enum": [
        "api",
        "planilha",
        "manual",
        "monitoramento"
      ]
    },
    "numero": {
      "type": [
        "string",
        "null"
      ]
    },
    "chave_acesso": {
      "type": [
        "string",
        "null"
      ]
    },
    "dps": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "serie": {
          "type": "string"
        },
        "numero": {
          "type": "string"
        }
      }
    },
    "valor": {
      "$ref": "#/$defs/Dinheiro"
    },
    "tomador": {
      "type": "object"
    },
    "servico": {
      "type": "object",
      "properties": {
        "codigo_nacional": {
          "type": "string"
        },
        "descricao": {
          "type": "string"
        },
        "competencia": {
          "type": "string"
        },
        "nbs": {
          "type": [
            "string",
            "null"
          ],
          "description": "NBS escolhido para a nota, sem pontos. `null` = padrão da empresa ou da tabela oficial; o que foi declarado aparece nos `ajustes`."
        },
        "obra": {
          "$ref": "#/$defs/ObraNfse"
        }
      }
    },
    "retencoes": {
      "type": "object"
    },
    "apuracao_propria": {
      "type": "object"
    },
    "iss": {
      "type": "object"
    },
    "rejeicao": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "codigo_oficial": {
          "type": [
            "string",
            "null"
          ]
        },
        "mensagem": {
          "type": "string",
          "description": "A mensagem do Sistema Nacional, como veio."
        },
        "explicacao": {
          "type": [
            "object",
            "null"
          ],
          "description": "Explicação da Sudrel para o código oficial, quando ele é\nconhecido. `null` quando não é: aí vale só a `mensagem`.\n",
          "properties": {
            "codigo": {
              "type": "string",
              "description": "Estável, ex.: `aliquota_iss_obrigatoria`."
            },
            "campo": {
              "type": [
                "string",
                "null"
              ],
              "description": "JSON Pointer no payload, quando é campo que você envia."
            },
            "mensagem": {
              "type": "string"
            },
            "correcao": {
              "type": "string"
            }
          }
        }
      }
    },
    "falha": {
      "type": [
        "object",
        "null"
      ],
      "description": "Só em `falha_transmissao`.",
      "properties": {
        "dps_enviada": {
          "type": "string",
          "enum": [
            "nao",
            "desconhecido"
          ]
        },
        "mensagem": {
          "type": [
            "string",
            "null"
          ]
        },
        "correcao": {
          "type": "string"
        }
      }
    },
    "cancelamento": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "em": {
          "type": "string",
          "format": "date-time"
        },
        "protocolo": {
          "type": "string"
        },
        "justificativa": {
          "type": "string"
        }
      }
    },
    "recuperada_em": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "substituicao": {
      "type": [
        "object",
        "null"
      ],
      "description": "Nesta nota (a nova), qual NFS-e ela substitui.",
      "properties": {
        "nfse_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "`null` quando a original foi emitida fora da Sudrel."
        },
        "chave_acesso": {
          "type": "string"
        },
        "codigo_motivo": {
          "type": "string"
        },
        "motivo": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "substituida_por": {
      "type": [
        "object",
        "null"
      ],
      "description": "Nesta nota (a original, agora `cancelada` pelo Sistema Nacional), qual a substituiu.",
      "properties": {
        "nfse_id": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "string"
            }
          }
        }
      }
    },
    "confirmacao": {
      "type": [
        "object",
        "null"
      ],
      "description": "Só em `aguardando_confirmacao`.",
      "properties": {
        "motivo": {
          "type": "string",
          "enum": [
            "competencia_encerrada"
          ]
        },
        "competencia": {
          "type": "string"
        },
        "mensagem": {
          "type": "string"
        },
        "correcao": {
          "type": "string"
        }
      }
    },
    "aviso": {
      "type": [
        "object",
        "null"
      ],
      "description": "Só em `transmitindo`, depois de 30 minutos.",
      "properties": {
        "codigo": {
          "type": "string",
          "enum": [
            "processamento_prolongado"
          ]
        },
        "desde": {
          "type": "string",
          "format": "date-time"
        },
        "mensagem": {
          "type": "string"
        }
      }
    },
    "ajustes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Ajuste"
      }
    },
    "eventos": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EventoNfse"
      }
    },
    "regras_versao": {
      "type": "string",
      "description": "Versões do catálogo de correções automáticas e do catálogo de regras de campo que decidiram esta nota, nessa ordem."
    },
    "criada_em": {
      "type": "string",
      "format": "date-time"
    },
    "atualizada_em": {
      "type": "string",
      "format": "date-time"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        },
        "pdf": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "Ajuste": {
      "type": "object",
      "description": "O que a Sudrel preencheu, derivou, omitiu ou exigiu, e por quê.",
      "properties": {
        "campo": {
          "type": "string",
          "description": "JSON Pointer."
        },
        "acao": {
          "type": "string",
          "enum": [
            "preenchido",
            "omitido",
            "derivado",
            "exigido"
          ]
        },
        "motivo": {
          "type": "string"
        },
        "regra": {
          "type": "string",
          "description": "Identificador estável da regra."
        }
      }
    },
    "Dinheiro": {
      "type": "string",
      "pattern": "^\\d{1,13}(\\.\\d{1,2})?$",
      "description": "Texto decimal com ponto, sem separador de milhar. Número JSON é recusado (422 `tipo_invalido`)."
    },
    "EventoNfse": {
      "type": "object",
      "properties": {
        "tipo": {
          "type": "string",
          "enum": [
            "criada",
            "envio",
            "consulta_dps",
            "correcao_automatica",
            "reenfileirada",
            "falha_validacao",
            "recuperada",
            "cancelada",
            "substituida",
            "aguardando_confirmacao",
            "competencia_confirmada",
            "processamento_prolongado",
            "falha_transmissao"
          ]
        },
        "em": {
          "type": "string",
          "format": "date-time"
        },
        "detalhe": {
          "type": "object"
        }
      }
    },
    "ObraNfse": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "cno": {
          "type": [
            "string",
            "null"
          ]
        },
        "cib": {
          "type": [
            "string",
            "null"
          ]
        },
        "inscricao_imobiliaria": {
          "type": [
            "string",
            "null"
          ]
        },
        "endereco": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "cep": {
              "type": "string"
            },
            "logradouro": {
              "type": "string"
            },
            "numero": {
              "type": "string"
            },
            "complemento": {
              "type": [
                "string",
                "null"
              ]
            },
            "bairro": {
              "type": "string"
            }
          }
        },
        "municipio_ibge": {
          "type": "string",
          "description": "Local da prestação."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sudrel-com-br-nfse"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.