XML Requirements for Invoice Updates
When using the PUT Update Invoice endpoint, it is mandatory to send the XML Distribution File (procNFe).
Sending only the signed XML (without authorization data) will result in a DANFE (PDF) generated with the watermark "Sem Valor Fiscal" (No Fiscal Value), as it lacks legal validity for transport.
Mandatory Structure
The integration expects the full "envelope" returned by SEFAZ after authorization. Your XML must include the following tags:
<procNFe>: The root element that bundles the NFe data and the protocol.<protNFe>: The authorization protocol group.<nProt>: The specific Authorization Protocol number.<cStat>: Must be100(Authorized), confirming the invoice is valid.
Correct XML Schema Example
<procNFe xmlns="[http://www.portalfiscal.inf.br/nfe](http://www.portalfiscal.inf.br/nfe)" versao="4.00">
<NFe>
<infNFe Id="NFe...">
...
</infNFe>
<Signature> ... </Signature>
</NFe>
<protNFe versao="4.00">
<infProt>
<tpAmb>1</tpAmb>
<cStat>100</cStat> // 100 or 150
<nProt>132240000000000</nProt>
</infProt>
</protNFe>
</procNFe>
Important Warning
If the uploaded XML contains only the
<NFe>tag, the order status will be updated, but the system will not be able to generate a legally valid PDF for the customer. Always ensure you are grabbing the XML after the SEFAZ authorization process is complete.
