# Consultar NFC-e por Chave de Acesso

## Endpoint

<mark style="color:blue;">`GET`</mark> `https://sandbox-api.invoisys.com.br/api/nfce/getbychavedeacesso/{chave}`

Realizar a consulta de uma NFC-e por sua chave de acesso, retornando todos os seus dados​

#### Path Parameters

| Name  | Type   | Description              |
| ----- | ------ | ------------------------ |
| chave | string | Chave de Acesso da NFC-e |

#### Headers

| Name          | Type   | Description                          |
| ------------- | ------ | ------------------------------------ |
| Content-type  | string | `application/x-www-form-urlencoded​` |
| Accept        | string | `application/json​​​`                |
| Authorization | string | `bearer <valor>`                     |

{% tabs %}
{% tab title="200 - NFC-e existente" %}

```javascript
{
  "id": 1668306,
  "chaveDeAcesso": "13191117921427000125650010000021849123412341",
  "dataHoraEmissao": "2019-11-04T10:48:52",
  "dataDeAutorizacao": "2019-11-04T10:52:31",
  "erro": false,
  "statusSEFAZ": "100",
  "descricaoSEFAZ": "Autorizado o uso da NF-e",
  "protocoloDeAutorizacao": "113190007577604",
  "status": {
    "key": 0,
    "value": "Autorizado"
  }
}
```

{% endtab %}

{% tab title="200 - NFC-e inexistente" %}
`null`
{% endtab %}

{% tab title="401 - Não autenticado" %}
`no content`
{% endtab %}
{% endtabs %}

## Enumerados

O grupo "status" é utilizado como um indicador de status interno do sistema. Portanto, considerar os campos key/value, conforme:

0 – Autorizada\
1 – Cancelada\
2 – Inutilizada\
3 – Erro (Rejeição/Timeout)\
4 – Aguardando Envio para a SEFAZ (Nota ainda na fila de envio para a SEFAZ em casos de contingência)\
5 – Desconhecido (Falha no processamento)\
9 – Denegada

## APIs Relacionadas 🎈

* [Consulta NFC-e por Número e Série](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-nfc-e-por-numero-e-serie.md)
* [Consulta NFC-e por ID](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-nfc-e-por-id.md)
* [Consulta Paginada de NFC-es](/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-paginada-de-nfc-es.md)

## Referências à API 📌

* [Passo-a-Passo da NFC-e](/invoisys/getting-started/documentos-fiscais/emissao/nfc-e/passo-a-passo.md)
* [Fluxograma - Envio Contigência SEFAZ​](/invoisys/getting-started/documentos-fiscais/emissao/nfc-e/fluxo-operacional/envio-contingencia-sefaz-nfc-e-flux.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integracao.gitbook.io/invoisys/endpoints/emissao-notas/nfc-e-1/api-consulta-nfc-e-por-chave-de-acesso.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
