Through the NF-e Correction Letter service, it’s possible to link a descriptive event of correction of information contained in the authorized NF-e.
Obs.: CC-e and CC are acronyms in portuguese for Correction Letter.
URL
Production: POST https://nfe.ns.eti.br/nfe/cce
Input data
Field | Description | Occurrence | Notes |
---|---|---|---|
X-AUTH-TOKEN | User access token | 1-1 | |
chNFe | NF-e access key | 1-1 | |
tpAmb | NF-e authorization environment type: 1 - Production 2 - Homologation | 1-1 | |
dhEvento | Date and time of the correction | 1-1 | Sefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC. E.g.: 2016-06-13T15:04:10-02:00 |
nSeqEvento | Event sequential number | 1-1 | Sequential of the event for the same type of event The event author must number sequentially |
xCorrecao | Correction description to be carried out in the NF-e | 1-1 | E.g.: "VALIDADE DA LICENCA DE 01/09/2015 A 01/09/2016.". Sefaz won't accept correction letters in english. Translation: "License validity from DD/MM/YYYY to DD/MM/YYYY.". |
Request example
NF-e CC-e request
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"X-AUTH-TOKEN": "YOUR_TOKEN",
"chNFe": "43161107364617000135550000000099461000094833",
"tpAmb": "2",
"dhEvento": "2016-11-28T19:06:14-02:00",
"nSeqEvento": "1",
"xCorrecao": "CC-e realizada para teste de integração"
}'\
https://nfe.ns.eti.br/nfe/cce
Returned data
Field | Description | Notes |
---|---|---|
status | Processing status code | |
motivo | Processing status literal description | |
retEvento | Object containing the correction processing data at Sefaz | Only when status = 200 |
retEvento.cStat | Processing situation code | |
retEvento.xMotivo | Literal description of the processing situation at Sefaz | |
retEvento.chNFe | NF-e access key | |
retEvento.dhRegEvento | Date and time of event registration at Sefaz | Sefaz Standard: YYYY-MM-DDTHH:MM:SS+UTC. E.g.: 2016-06-13T15:04:10-02:00 |
retEvento.nProt | Sefaz authorization protocol number for the event | |
erro | Object containing the error information in case the correction could not be carried out successfully | Only when status is different from 200 |
erro.cStat | Error status code | |
erro.xMotivo | Error literal description |
Return example
Successful return
{
"status": 200,
"motivo": "CC-e vinculada com sucesso",
"retEvento": {
"cStat": 135,
"xMotivo": "Evento registrado e vinculado a NF-e",
"chNFe": "43161107364617000135550000000099461000094833",
"dhRegEvento": "2016-11-30T16:14:24-02:00",
"nProt": "143160001515534"
}
}
Return codes
Code | Description |
---|---|
200 | CC-e linked successfully |
-2 | Invalid access key |
-3 | It was not possible to link the CC-e to the NF-e. Check the "erro" object for more information |
Download the NF-e Correction Letter
You can download the complete CC-e event distribution information in XML or JSON and also a graphical representation of the same in PDF formar. For this, check the Event Download method in the NS NF-e API.