NFC-e
Query NFC-e
Returns status, QR Code, receipt and XML links and the echo of the issuance.
GET
/openapi/v2/empresas/{empresaId}/nfce/{nfceId}Requires the
token, timestamp and sign signature headers, see Authentication.Queries by the id sent at issuance. Download links need no signature and are re-issued on every query; see File download. The receipt is rendered on the first download; if the rendering service is busy the link returns 503 and a retry is enough.
Path parameters
empresaId* | string | Issuing company identifier |
nfceId* | string | NFC-e identifier |
* Required field
200
Invoice found.
id | string | Request identifier |
tipo | string | Document type |
status | string | Status |
motivoStatus | string | Reason |
ambienteEmissao | string | Issuing environment |
dataCriacao | string | Creation time |
dataUltimaAlteracao | string | Last change |
| object | Order |
| object | Consumer |
transporte | object | Transport |
numero | string | Invoice number |
serie | string | Series |
dataEmissao | string | Issue time |
chaveAcesso | string | Access key |
dataAutorizacao | string | Authorization time |
| object | Authorization protocol |
qrCode | string | QR Code content |
urlConsulta | string | Lookup URL by access key |
linkDanfe | string | Receipt PDF link |
linkDownloadXml | string | XML link |
emitidaEmContingencia | bool | Issued in contingency |
alertas | array | Authorization warnings |
| array | Items |
valorTotal | number | Invoice total |
terminal | string | Till identifier |
statusStatus
While a cancellation is in progress the invoice stays Autorizada.
| Values | Meaning |
|---|---|
| AguardandoAutorizacao | Accepted, waiting for SEFAZ |
| Autorizada | Authorized by SEFAZ |
| Negada | Rejected by SEFAZ, or failed during platform processing; reason in motivoStatus |
| Cancelada | Cancelled |
| ContingenciaPendente | Issued offline while SEFAZ was down; the platform transmits it once SEFAZ is back |
tipoDocument type
| Values | Meaning |
|---|---|
| NFC-e | Electronic consumer invoice; always this value |
ambienteEmissaoIssue environment
| Values | Meaning |
|---|---|
| Homologacao | SEFAZ test environment; the invoice has no legal effect |
| Producao | Official environment |
pedido.presencaConsumidorConsumer presence
| Values | Meaning |
|---|---|
| OperacaoPresencial | In-store sale; do not send a carrier |
| EntregaEmDomicilio | Non-presential sale with delivery; requires cliente with document and address, and transporte.transportadora; the delivery place must be in the issuer state |
| OperacaoPresencialForaDoEstabelecimento | Presential sale outside the shop, such as a fair or street stall; do not send a carrier |
pedido.pagamento.formas[].tipoPayment type
Echoed from issuance.
| Values | Meaning |
|---|---|
| Dinheiro | Cash; may produce change |
| Cheque | Cheque |
| CartaoDeCredito | Credit card; many states require credenciadoraCartao |
| CartaoDeDebito | Debit card; many states require credenciadoraCartao |
| CreditoLoja | Store credit, sale on credit |
| ValeAlimentacao | Food voucher; accepts credenciadoraCartao |
| ValeRefeicao | Meal voucher; accepts credenciadoraCartao |
| ValePresente | Gift voucher; accepts credenciadoraCartao |
| ValeCombustivel | Fuel voucher; accepts credenciadoraCartao |
| BoletoBancario | Bank slip; accepts credenciadoraCartao |
| DepositoBancario | Bank deposit |
| PagamentoInstantaneoPix | Dynamic Pix; many states require credenciadoraCartao |
| TransferenciaBancaria | Bank transfer; accepts credenciadoraCartao |
| ProgramaDeFidelidade | Loyalty programme or cashback |
| PagamentoInstantaneoPixEstatico | Static Pix: static QR code, Pix key or account details |
| CreditoEmLoja | In-store balance from an earlier payment or a return |
| PagamentoEletronicoNaoInformado | Electronic payment not reported; only when a hardware failure prevents integrating the payment and offline issuance |
| PagamentoInstantaneoPixAutomatico | Automatic Pix, recurring charge |
| TransferenciaTefBookTransfer | TEF transfer between accounts at the same bank |
| PagamentoPosterior | Deferred payment; value 0, the sum may fall below the total and there is no change |
| Outros | Other; requires descricao |
cliente.endereco.ufConsumer state
Echoed from issuance; always the issuer state.
| Values | Meaning |
|---|---|
| AC | Acre |
| AL | Alagoas |
| AP | Amapá |
| AM | Amazonas |
| BA | Bahia |
| CE | Ceará |
| DF | Distrito Federal |
| ES | Espírito Santo |
| GO | Goiás |
| MA | Maranhão |
| MT | Mato Grosso |
| MS | Mato Grosso do Sul |
| MG | Minas Gerais |
| PA | Pará |
| PB | Paraíba |
| PR | Paraná |
| PE | Pernambuco |
| PI | Piauí |
| RJ | Rio de Janeiro |
| RN | Rio Grande do Norte |
| RS | Rio Grande do Sul |
| RO | Rondônia |
| RR | Roraima |
| SC | Santa Catarina |
| SP | São Paulo |
| SE | Sergipe |
| TO | Tocantins |
transporte.frete.modalidadeFreight modality
| Values | Meaning |
|---|---|
| SemFrete | No freight |
| PorContaDoEmitente | Freight paid by the seller |
| PorContaDoDestinatario | Freight paid by the buyer |
| PorContaDeTerceiros | Freight paid by a third party |
| TransporteProprioPorContaDoRemetente | Seller own transport |
| TransporteProprioPorContaDoDestinatario | Buyer own transport |
itens[].cfopCFOPs accepted on NFC-e
Echoed from issuance.
| Values | Meaning |
|---|---|
| 5101 | Sale of own production. ICMS without ST: CST 00 / 20 / 40 / 41 / 90 or CSOSN 102 / 103 / 300 / 400 / 900 |
| 5102 | Resale of third-party goods. Same non-ST codes as 5101 |
| 5103 | Sale of own production outside the establishment. Same non-ST codes as 5101 |
| 5104 | Resale of third-party goods outside the establishment. Same non-ST codes as 5101 |
| 5115 | Sale of goods received on commercial consignment. Same non-ST codes as 5101 |
| 5405 | Sale of goods with ICMS already withheld by ST. CST 60 or CSOSN 500 |
| 5656 | Fuel sale to the final consumer. Requires the combustivel block; CST 60 / 61 or CSOSN 500 |
| 5667 | Fuel sale to the final consumer outside the establishment. Requires the combustivel block; CST 60 / 61 or CSOSN 500 |
| 5910 | Gift or bonus. Accepts codes with and without ST |
| 5933 | Service taxed by ISSQN. Requires impostos.issqn instead of icms and ncm = 00; the invoice needs at least one goods line |
| Code | HTTP | |
|---|---|---|
| 10022006 | 404 | nfceId not found for this company. |
| 10003000 | 404 | empresaId not found. |
