> For the complete documentation index, see [llms.txt](https://integracao.gitbook.io/invoisys/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integracao.gitbook.io/invoisys/endpoints/recebimento-notas/nf-e/api-entrada-de-nf-e-xml-resumido-obtido.md).

# Consultar NSUi (Número Sequencial Único Invoisys)

### Endpoint

<mark style="color:blue;">`GET`</mark> `https://sandbox-api.invoisys.io/v1/nfe-entrada/eventos-nsui/{cnpj}/{nsui}`

#### Headers

| Name          | Type   | Description        |
| ------------- | ------ | ------------------ |
| Accept        | string | `application/json` |
| Authorization | string | `bearer <valor>`   |

#### Request Body

| Name | Type    | Description                                 |
| ---- | ------- | ------------------------------------------- |
| cnpj | integer | CNPJ do destinatário da NF-e                |
| nsui | integer | Próximo número sequencial único requisitado |

#### Response

{% tabs %}
{% tab title="200 - Sucesso" %}

```csharp
{
  "tipoDoc": 1,
  "nsuiMaxDisponivel": 794,
  "documentos": [
    {
      "nsuiMaxDisponivel": 794,
      "nsui": 790,
      "docId": 1229554,
      "createDate": "2024-09-09T23:41:40.46734",
      "tipoDoc": 1,
      "chaveDoc": "35240954389083000181550030000000291415436575",
      "serie": "3",
      "numero": "29",
      "dataHoraEmissao": "2024-09-09T17:45:18",
      "tipoEvento": 1001,
      "descricaoEvento": "XML Completo",
      "xmlEvento": "PG5mZVByb2MgdmVyc2FvPSI0LjAwIiB4bWxucz0iaHR0cDovL3d3dy5wb3JAgICA8L2lkZT4NCiAgICAgIDxlbWl0Pg0KICAgICAgICA8Q05QSj41NDM4OTA4MzAwMDE4M..."
    },
    {
      "nsuiMaxDisponivel": 794,
      "nsui": 791,
      "docId": 1232596,
      "createDate": "2024-09-10T13:11:40.387571",
      "tipoDoc": 1,
      "chaveDoc": "35240950924801000111550010000004471126376898",
      "serie": "1",
      "numero": "447",
      "dataHoraEmissao": "2024-09-10T10:02:34",
      "tipoEvento": 1000,
      "descricaoEvento": "XML Resumido",
      "xmlEvento": "DQogIDxjU2l0TkZlPjE8L2NTaXRORmU+DQo8L3Jlc05GZT4GTAS34SdfaATGAS..."
    },
    {
      "nsuiMaxDisponivel": 794,
      "nsui": 792,
      "docId": 1232597,
      "createDate": "2024-09-10T13:11:40.406302",
      "tipoDoc": 1,
      "chaveDoc": "35240950924801000111550010000004481963984658",
      "serie": "1",
      "numero": "448",
      "dataHoraEmissao": "2024-09-10T10:05:35",
      "tipoEvento": 1000,
      "descricaoEvento": "XML Resumido",
      "xmlEvento": "PHJlc05GZSB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWEVsfasEr.."
    },
    {
      "nsuiMaxDisponivel": 794,
      "nsui": 793,
      "docId": 1232597,
      "createDate": "2024-09-10T13:11:41.099346",
      "tipoDoc": 1,
      "chaveDoc": "35240950924801000111550010000004481916289035",
      "serie": "1",
      "numero": "448",
      "dataHoraEmissao": "2024-09-10T10:05:35",
      "tipoEvento": 510630,
      "descricaoEvento": "Registro de Passagem Automatico Originado MDFe",
      "xmlEvento": "PHJlc0V2ZW50byB4bWxuczp4c2Q9Imh0dHA6LEuMDEiIHhXZlbnRvPjIwMjQVudG8+NTEwNjM.."
    {
      "nsuiMaxDisponivel": 794,
      "nsui": 794,
      "docId": 1232596,
      "createDate": "2024-09-10T13:11:42.077968",
      "tipoDoc": 1,
      "chaveDoc": "35240950924801000111550010000004471114256784",
      "serie": "1",
      "numero": "447",
      "dataHoraEmissao": "2024-09-10T10:02:34",
      "tipoEvento": 610614,
      "descricaoEvento": "MDF-e Autorizado com CT-e",
      "xmlEvento": "PHJlc0V2ZW50byB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4.."
    }
  ]
}
```

{% endtab %}

{% tab title="400 - CNPJ ou NSUi inexistente" %}

```csharp
{
  "tipoDoc": 0,
  "nsuiMaxDisponivel": 0,
  "documentos": []
}
```

{% endtab %}
{% endtabs %}

### Enumeradores

<details>

<summary>TipoEvento</summary>

• XML Resumido = 1000 \
&#x20;  o XML resumido da NF-e capturado automaticamente na distribuição da Receita;&#x20;

• XML Completo = 1001 \
&#x20;  o XML completo é obtido após a manifestação e a requisição de download junto à Receita Federal, seja por meio de um processo automatizado configurado na empresa ou manualmente pelo usuário.&#x20;

• Carta de Correção = 110110 \
&#x20;  o XML do CC-e da NF-e.&#x20;

• Cancelamento = 110111 \
&#x20;  o XML do cancelamento da NF-e;&#x20;

• Comprovante de Entrega da NF-e = 110130&#x20;

• Confirmacao da Operacao = 210200 \
&#x20;  o Manifestação conclusiva efetuada via processo automatizado na empresa ou manualmente pelo usuário;&#x20;

• Ciencia da Operacao = 210210 \
&#x20;  o Manifestação provisória efetuada via processo automatizado na empresa ou manualmente pelo usuário;&#x20;

• Desconhecimento da Operacao = 210220 \
&#x20;  o Manifestação conclusiva efetuada via processo automatizado na empresa ou manualmente pelo usuário;&#x20;

• Operação nao Realizada = 210240 \
&#x20;  o Manifestação conclusiva efetuada via processo automatizado na empresa ou manualmente pelo usuário;&#x20;

• Comprovante de Entrega do CT-e = 610130&#x20;

• Registro de Passagem Autorização = 610500&#x20;

• Registro de Passagem de NFe propagado pelo MDFe = 610510&#x20;

• Registro de Passagem de NFe propagado pelo MDFe/CTe = 610514&#x20;

• Registro de Passagem Automatico MDFe = 610552&#x20;

• Registro de Passagem Automatico MDF-e com CT-e = 610554&#x20;

• Registro de Autorização de CT-e para a NF-e = 610600&#x20;

• Registro de Cancelamento de CT-e para a NF-e = 610601&#x20;

• MDF-e autorizado = 610610&#x20;

• MDF-e cancelado = 610611&#x20;

• MDF-e Autorizado com CT-e = 610614&#x20;

• Cancelamento de MDF-e Autorizado com CT-e = 610615&#x20;

• Vistoria SUFRAMA = 990900&#x20;

• Confirmacao de Internalizacao da Mercadoria na SUFRAMA = 990910

</details>

{% hint style="info" %}

#### Swagger

[Você pode acessar nossa API e realizar testes diretamente na nossa plataforma Swagger!](https://sandbox-api.invoisys.io/swagger/index.html)
{% endhint %}

## APIs Relacionadas 🎈

* [Realizar Manifesto da NF-e](/invoisys/endpoints/recebimento-notas/nf-e/api-realizar-manifesto-da-nf-e.md)
* [Realizar Download de NF-e na SEFAZ](/invoisys/endpoints/recebimento-notas/nf-e/api-realizar-download-de-nf-e-na-sefaz.md)

## Referências à API 📌

* [Passo-a-Passo do Recebimento NF-e](/invoisys/getting-started/documentos-fiscais/recebimento/nf-e/passo-a-passo.md)
* [Fluxograma - Recebimento NF-e](/invoisys/getting-started/documentos-fiscais/recebimento/nf-e/fluxos-operacionais/fluxo-recebimento-nf-e.md)


---

# 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://integracao.gitbook.io/invoisys/endpoints/recebimento-notas/nf-e/api-entrada-de-nf-e-xml-resumido-obtido.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.
