> For the complete documentation index, see [llms.txt](https://ajuda.espiaonfe.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.espiaonfe.com.br/gestao/nf-e/historico/investigar-xml.md).

# Investigar XML

### 🤔 O que seria Investigar XML?

Este recurso permite verificar se a SEFAZ já disponibilizou os arquivos XML das notas fiscais manifestadas.

{% hint style="info" %}
Ao realizar a consulta na SEFAZ, os arquivos XML das notas manifestadas (Ciência ou Confirmação da Operação) são retornados automaticamente

O recurso **"Investigar XML"** é útil quando uma nota já foi manifestada, mas o arquivo XML correspondente ainda não foi recebido na consulta. Ele permite investigar e recuperar o documento ausente.
{% endhint %}

**Pré-requisitos** \
Antes de utilizar esta funcionalidade, verifique se sua empresa atende aos seguintes critérios: \
✔ Possuir um certificado digital do tipo A1. \
✔ Os documentos a serem consultados devem ter data de **emissão dentro dos últimos 90 dias**. \
✔ A consulta está sujeita ao limite exigido pela SEFAZ: **máximo de 20 XMLs por hora**.

{% hint style="warning" %}
**ATENÇÃO**

A SEFAZ **somente** disponibiliza os arquivos XML das notas fiscais manifestadas como: **Ciência** ou **Confirmação da Operação**.\
\
Se a manifestação do destinatário **ainda não foi realizada acesse:** [Manifest. Destinatário](/gestao/nf-e/manifest.-destinatario/certificado-a1.md).
{% endhint %}

### 📃 Para Investigar os XMLs, siga as instruções a seguir

1\. No menu **Histórico**, selecione a opção **NF-e**

<div align="left"><figure><img src="/files/rSjs9pgSKlZRZ5xNH4nj" alt=""><figcaption></figcaption></figure></div>

2\. Na aba **“NF-e Histórico”**, selecione a opção desejada entre **“Grupos de empresas”** ou **“Somente a(s) empresa(s)”**. Em seguida, defina o período que deseja visualizar, escolhendo entre **“Mês atual”**, **“Mês passado”** ou, se preferir, clique diretamente no campo de data para selecionar um período personalizado.

<div align="left"><figure><img src="/files/Eju8ZSpnitGfCYFLEqmq" alt="" width="563"><figcaption></figcaption></figure></div>

3. Em seguida, selecione o(s) documento(s) sem arquivo(s) XML(s).

<figure><img src="/files/B9wNwDXCstvB0LPDbwCo" alt=""><figcaption></figcaption></figure>

4. Depois clique em **Investigar XML.**

<figure><img src="/files/ozpq1WMo2yxY7L7D00Vm" alt=""><figcaption></figcaption></figure>

Seguindo esses passos, você poderá verificar e obter os XMLs das notas fiscais manifestadas de forma rápida e segura! 🚀


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ajuda.espiaonfe.com.br/gestao/nf-e/historico/investigar-xml.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
