> 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-5.md).

# Consultar anexo

### Endpoint

<mark style="color:blue;">`GET`</mark> `https://sandbox-api.invoisys.io/v1/nfe-entrada/obter-anexo/{ambiente}/{idArquivo}`

#### Headers

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

#### Request Body

| Name      | Type    | Description                                                                                                     |
| --------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| ambiente  | integer | <p>Ambiente de importação do XML<br><code>ENUM: 1 - Produção; 2 - Homologação</code><br><code>TAM: 1</code></p> |
| idArquivo | integer | ID invoiSys do anexo vinculado a uma NF-e                                                                       |

#### Response

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

```csharp
	
{
  "idArquivo": "356553325169831937",
  "fileName": "Teste.xml",
  "base64": "PG5mZVByb2MgeG1sbnM9Imh0dHVRkJ6QUJoaVpvZEhSd09pOHZiMk56Y0MxaFl5MWljaTF5Wm1JdVkyVnlkR2x6YVdkdUxtTnZiUzVpY2pBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQWdFQTdKVlA4TmtXcnBtZzBZZHR0Z25mMk8wQW9KWWxkK0VFYjJvUzZCRDF1Y2dSZjlUWmpCRi9ZMzNPM3M3SnY1Y2p4aVo5VVJjeEplS3lSS0plR2l6M29OdnQrR3dTWnRHWEFpaHJ6UlBTSGdtQUt3M1pKY25iN0FlREVtQnQrY1AxLzlXQnBrTk9UcVcwZVloUU95azRvcUlOY3owUzg2d0tRQmFYg..",
  "mensagem": "Sucesso!"
}
```

{% endtab %}

{% tab title="400 - Anexo inexistente" %}

```csharp
{
  "idArquivo": null,
  "fileName": null,
  "base64": null,
  "mensagem": "O anexo não existe na base de dados"
}
```

{% endtab %}
{% endtabs %}

{% 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 🎈

* [Importar anexo](/invoisys/endpoints/recebimento-notas/nf-e/api-entrada-de-nf-e-por-xml-2.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)
