Sudrel · Schema

Nfe

FinanceInvoicingBrazilSoftware-as-a-Service

Properties

Name Type Description
id string
referencia stringnull
status string
empresa_id string
ambiente string
simulacao stringnull
modo string
modelo integer
serie integer
numero integer
chave_acesso string
chaves_anteriores array Chaves que a nota teve antes de uma correção num mês seguinte.
chave_referenciada stringnull Chave da NF-e de origem referenciada (devolução, complementar); null quando a nota não referencia nenhuma.
protocolo stringnull
emitida_em stringnull
autorizada_em stringnull
valor_total stringnull
sefaz objectnull
rejeicao object
denegacao object
falha_envio objectnull Nota em `transmitindo` que ainda não chegou à SEFAZ por uma falha antes do envio. Com `certificado_recusado_pela_sefaz`, a SEFAZ recusou o certificado sem processar a nota (nenhuma NF-e foi criada lá)
contingencia objectnull A nota entrou em contingência (veja Contingência da NF-e). Nulo na emissão normal.
confirmacao objectnull
descarte objectnull
cancelamento objectnull
cartas_correcao array
ajustes array
eventos array
regras_versao string
criada_em string
atualizada_em string
links object
View JSON Schema on GitHub

JSON Schema

sudrel-com-br-nfe-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-nfe-schema.json",
  "title": "Nfe",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudrel-com-br-openapi.yml#/components/schemas/Nfe",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "referencia": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "transmitindo",
        "aguardando_confirmacao",
        "autorizada",
        "rejeitada",
        "denegada",
        "cancelada",
        "descartada",
        "contingencia_epec"
      ]
    },
    "empresa_id": {
      "type": "string"
    },
    "ambiente": {
      "type": "string",
      "enum": [
        "sandbox",
        "producao"
      ]
    },
    "simulacao": {
      "type": [
        "string",
        "null"
      ]
    },
    "modo": {
      "type": "string",
      "enum": [
        "informado",
        "calcular",
        "conferir"
      ]
    },
    "modelo": {
      "type": "integer",
      "enum": [
        55
      ]
    },
    "serie": {
      "type": "integer"
    },
    "numero": {
      "type": "integer"
    },
    "chave_acesso": {
      "type": "string"
    },
    "chaves_anteriores": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Chaves que a nota teve antes de uma correção num mês seguinte."
    },
    "chave_referenciada": {
      "type": [
        "string",
        "null"
      ],
      "description": "Chave da NF-e de origem referenciada (devolução, complementar); null quando a nota não referencia nenhuma."
    },
    "protocolo": {
      "type": [
        "string",
        "null"
      ]
    },
    "emitida_em": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "autorizada_em": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "valor_total": {
      "type": [
        "string",
        "null"
      ]
    },
    "sefaz": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "cstat": {
          "type": "string"
        },
        "motivo": {
          "type": "string"
        }
      }
    },
    "rejeicao": {
      "$ref": "#/$defs/NfeRecusa"
    },
    "denegacao": {
      "$ref": "#/$defs/NfeRecusa"
    },
    "falha_envio": {
      "type": [
        "object",
        "null"
      ],
      "description": "Nota em `transmitindo` que ainda não chegou à SEFAZ por uma falha antes do\nenvio. Com `certificado_recusado_pela_sefaz`, a SEFAZ recusou o certificado\nsem processar a nota (nenhuma NF-e foi criada lá): a Sudrel tenta de novo em\n`proxima_tentativa`, e a prontidão mostra o item `certificado_sefaz`. Com\n`envio_pausado`, a recusa se repetiu (3 vezes, por padrão) e a Sudrel parou de\ntentar (webhook `NFE_ENVIO_PAUSADO`): a nota volta sozinha quando o\ncertificado passar no teste da prontidão (um certificado novo, ou o mesmo uma\nhora depois).\n",
      "properties": {
        "motivo": {
          "type": "string",
          "enum": [
            "certificado_recusado_pela_sefaz",
            "envio_pausado",
            "uf_indisponivel",
            "falha_antes_do_envio"
          ]
        },
        "mensagem": {
          "type": "string"
        },
        "desde": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "proxima_tentativa": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "pausado_em": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "contingencia": {
      "type": [
        "object",
        "null"
      ],
      "description": "A nota entrou em contingência (veja Contingência da NF-e). Nulo na emissão normal.",
      "properties": {
        "modo": {
          "type": "string",
          "enum": [
            "svc_an",
            "svc_rs",
            "epec"
          ]
        },
        "tp_emis": {
          "type": "integer",
          "enum": [
            4,
            6,
            7
          ]
        },
        "situacao": {
          "type": "string",
          "enum": [
            "em_contingencia",
            "autorizada_em_contingencia",
            "epec_registrado",
            "epec_prazo_proximo",
            "epec_rejeitado",
            "duplicata_cancelada",
            "duplicata_nao_cancelada",
            "duplicata_original_denegada"
          ]
        },
        "motivo": {
          "type": "string",
          "description": "A justificativa (xJust) impressa no DANFE."
        },
        "desde": {
          "type": "string",
          "format": "date-time"
        },
        "chave_original": {
          "type": "string",
          "description": "A chave tpEmis 1, que nunca foi transmitida."
        },
        "chave_original_transmitida": {
          "type": "boolean",
          "enum": [
            false
          ]
        },
        "epec": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "protocolo": {
              "type": "string"
            },
            "registrado_em": {
              "type": "string",
              "format": "date-time"
            },
            "prazo_transmissao": {
              "type": "string",
              "format": "date-time",
              "description": "168 horas depois do EPEC."
            },
            "correcao": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "reconciliacao": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "em": {
              "type": "string",
              "format": "date-time"
            },
            "resultado": {
              "type": "string",
              "enum": [
                "original_inexistente",
                "duplicata_cancelada",
                "duplicata_nao_cancelada",
                "duplicata_original_denegada"
              ]
            }
          }
        }
      }
    },
    "confirmacao": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "motivo": {
          "type": "string"
        },
        "desde": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "mensagem": {
          "type": "string"
        },
        "correcao": {
          "type": "string"
        }
      }
    },
    "descarte": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "em": {
          "type": "string",
          "format": "date-time"
        },
        "automatico": {
          "type": "boolean"
        },
        "motivo": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "cancelamento": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "em": {
          "type": "string",
          "format": "date-time"
        },
        "protocolo": {
          "type": "string"
        },
        "justificativa": {
          "type": "string"
        }
      }
    },
    "cartas_correcao": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sequencia": {
            "type": "integer"
          },
          "texto": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "transmitindo",
              "registrada",
              "rejeitada"
            ]
          },
          "protocolo": {
            "type": [
              "string",
              "null"
            ]
          },
          "sefaz": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "cstat": {
                "type": "string"
              },
              "motivo": {
                "type": "string"
              }
            }
          },
          "em": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "ajustes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "campo": {
            "type": "string"
          },
          "acao": {
            "type": "string",
            "enum": [
              "preenchido",
              "derivado",
              "exigido",
              "omitido",
              "calculado",
              "divergente"
            ]
          },
          "motivo": {
            "type": "string"
          },
          "regra": {
            "type": "string"
          },
          "valor": {
            "description": "Modos calcular e conferir: o valor.",
            "nullable": true
          },
          "versao": {
            "type": "string",
            "description": "Versão da regra, tabela ou calculadora."
          },
          "fonte": {
            "type": "string",
            "description": "Fonte legal do valor."
          }
        }
      }
    },
    "eventos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string"
          },
          "em": {
            "type": "string",
            "format": "date-time"
          },
          "detalhe": {
            "type": "object"
          }
        }
      }
    },
    "regras_versao": {
      "type": "string"
    },
    "criada_em": {
      "type": "string",
      "format": "date-time"
    },
    "atualizada_em": {
      "type": "string",
      "format": "date-time"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        },
        "danfe": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "NfeRecusa": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "codigo_oficial": {
          "type": "string",
          "description": "cStat da SEFAZ."
        },
        "mensagem": {
          "type": "string",
          "description": "xMotivo da SEFAZ."
        },
        "explicacao": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "codigo": {
              "type": "string"
            },
            "campo": {
              "type": [
                "string",
                "null"
              ]
            },
            "correcao": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

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-nfe"
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.