The NF3-e issuing service is responsible for carrying out the validation of the NF3e data sent according to the types of data define by Sefaz XML schemas and sending the document for processing on the WebSevice of the Porta da Secretaria da Fazenda.
The response of this service contains the receipt stats of the NF3-e by the API and the nsNRec for checking on the processing status.
URL
Production: POST https://nf3e.ns.eti.br/v1/nf3e/issue
Input Data
The data for the issuing method can be sent in JSON or XML.
Sending data in JSON format
To send data in XML, the request’s Content-type must be defined as application/xml and the X-AUTH-TOKEN must be sent at the HTTP header.
Field | Occurence | Data Type | Parent | Description |
---|---|---|---|---|
X-AUTH-TOKEN | 1-1 | String | User access token. It can also be sent via Header or QueryString in the URL | |
NF3e | 1-1 | Object | NF3e data (according to the Sefaz Contributors’ Guidance Manual) |
Clicking on the file below it’s possible to download a complete example of NF3-e in JSON.
Sending data in XML format
To send data in XML, the request’s Content-type must be defined as application/xml and the X-AUTH-TOKEN must be sent at the HTTP header.
When sending in XML format, the request’s body must contains the XML content with the NF3-e information. This content must be generated from the layout of the Sefaz Contributors’ Guidance Manual.
Clicking on the file below it’s possible to download a complete example of NF3-e in XML.
Request Example
NF3-e issue request in JSON
curl -X POST \
-H "Content-Type: application/json" \
-d '{"X-AUTH-TOKEN":"...","NF3e":{...}}' \
https://nf3e.ns.eti.br/v1/nf3e/issue
NF3-e issue request in XML
curl -X POST \
-H "X-AUTH-TOKEN: SEU_TOKEN" \
-H "Content-Type: application/xml" \
-d '<NF3e xmlns="http://www.portalfiscal.inf.br/nf3e"><infNF3e versao="1.00" Id="NF3e43081808467115000100660010757245731000000010">...</NF3e>' \
https://nf3e.ns.eti.br/v1/nf3e/issue
Returned Data
Field | Description | Notes |
---|---|---|
status | Processing status code | |
motivo | Literal description of the processing status | |
nsNRec | NF3-e internal API process code | Only when status = 200 |
Response Examples
Successful response
{
"status": 200,
"motivo": "NF3-e enviada para Sefaz",
"nsNRec": "1234"
}
Response with an error
{
"status": -2,
"motivo": "NF3e invalida de acordo com a validacao contra schema",
"erros": [
"O campo 'CEP' foi preenchido incorretamente com o valor '9003000'. Este campo deve ser preenchido com numeros e conter exatamente 8 caracteres. (cvc-pattern-valid: Value '9003000' is not facet-valid with respect to pattern '[0-9]{8}' for type '#AnonType_CEPTEndeEmi'.)"
]
}
Return Codes
Code | Description |
---|---|
200 | NF3-e successfully received and sent to Sefaz |
-2 | Information invalid according to data type. Check the "motivo" field to identify the incorrect fields |
-3 | No validation scheme for the NF3-e version reported in NF3e/infNF3e/version |
-4 | Data sent out of the expected standard. Verify the "motivo" field for more information |
-5 | Error sending NF3-e to Sefaz. Verify the error object for more information |
-6 | NF3-e previously authorized. Check the processing status of the returned nsNRec |
-7 | Invalid Content-type |
-8 | Could not load NF3-e QRCode URL |