NF-e 4.00
Brazilian electronic invoice (Nota Fiscal Eletrônica)
The Brazilian electronic invoice for goods (model 55), in the layout of schema package PL_010f.
About
An NF-e is an XML document signed by the issuer and authorised by the state tax authority (SEFAZ) before the goods move. The SEFAZ web services reject a document that does not match the schema.
The schemas come from the package Pacote de Liberação nº 010f, which includes the tax reform fields of NT 2025.002 and NT 2026.007.
Good to know
- The schema checks structure and data types. The SEFAZ business rules (hundreds of numbered rejections such as 225 or 539) are not published as a schema and are not checked here.
- The example is by xmlvalid.com: a homologação (test environment) document with dummy CNPJs and a placeholder signature.
Files
5 files · 441.5 KB-
nfe_v4.00.xsd main
-
leiauteNFe_v4.00.xsd
-
xmldsig-core-schema_v1.01.xsd
-
tiposBasico_v4.00.xsd
-
DFeTiposBasicos_v1.00.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Example document
nfe.xml · 4.5 KB · valid against this schema
In CI and from code
The same schema by its name, nfe-4.00, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema nfe-4.00
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: nfe-4.00
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document={{ $schema->example ?? 'document.xml' }} -F schema=nfe-4.00
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups