> 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/api-de-integracao/o-que-faz.md).

# O que faz

Utilize a nossa API para integrar o software da sua empresa com o Espião Cloud.

### Receba as Notas Fiscais diretamente no seu software, sem complicações com as constantes mudanças da SEFAZ.

Integre o software da sua empresa através da nossa ***API RESTful*** e deixe a parte de regras e alterações da SEFAZ por nossa conta.

### API Histórico DF-e

1. O Espião Cloud realiza as **consultas automáticas dos documentos fiscais (NF-e e CT-e)** das empresas na SEFAZ, seguindo todas as regras atualizadas disponibilizadas nas Notas Técnicas.
2. Todos documentos consultados ficam armazenados na base de dados do Espião Cloud.
3. O seu software (ERP, contábil e outros) *se conecta no Espião Cloud* através da nossa *API RESTful.*
4. Através da integração seu software poderá em qualquer momento utilizar os serviços disponibilizados na API, tais como:

* Download de XMLs com filtros de pesquisa;
* Download  do PDF (DANFE e DACTE) através da chave de acesso;
* Consulta documentos armazenados no Espião Cloud;
* Consulta de NFS-e (municipal) em tempo real nas prefeituras;
* Manifestação do Destinatário e Desacordo de CT-e;
* Cadastro de empresas e certificados;
* E muito mais.

### API Resgate XML

Recupera o XML da sua Nota Fiscal direto da SEFAZ, mesmo para notas emitidas há até 11 anos atrás, usando apenas as chaves de acesso.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ajuda.espiaonfe.com.br/api-de-integracao/o-que-faz.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
