XSD+SCH Portal Nacional da NF-e (ENCAT, Receita Federal) · 4.00 (PL_010f)

NF-e 4.00 with authorisation protocol

Authorised Brazilian NF-e with its SEFAZ protocol (nfeProc)

An authorised NF-e (model 55) with the SEFAZ authorisation protocol, the XML file issuers keep and send to the buyer.

About

Once the SEFAZ authorises an NF-e, the issuer keeps the signed document together with the authorisation protocol (protNFe) in one nfeProc file. This is the XML a buyer receives and the file most systems export.

The schema is procNFe_v4.00.xsd of Pacote de Liberação nº 9, unchanged, over the NF-e layout of package 010f, which still defines the nfeProc type.

E-invoicing in Brazil: the rules in short and how to check an invoice →

Good to know

  • The NF-e inside is checked against the schema and the SEFAZ authorisation rules that need only the file, as in NF-e 4.00. The protocol is checked for its structure only: whether the SEFAZ really issued it is not checked.
  • The example is the NF-e 4.00 example with a placeholder protocol of the homologação environment.

Files

5 files · 441.3 KB · Download all (.zip)

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Business rules

Schematron · run in this order

The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.

Example document

nfe-proc.xml · 6.6 KB · passes the schema and the rules

In CI and from code

The same schema by its name, nfe-4.00-proc, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema nfe-4.00-proc
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: nfe-4.00-proc
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document=@nfe-proc.xml \
  -F schema=nfe-4.00-proc

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