> For the complete documentation index, see [llms.txt](https://devcenter.unico.io/unico-people/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devcenter.unico.io/unico-people/unico-people-v1/apis/anexos.md).

# Anexos

Listagem de anexos

## List attachments by account <a href="#list-attachments-by-account" id="list-attachments-by-account"></a>

Busca todos os anexos atrelados a uma account.

<mark style="color:green;">`GET`</mark> \ <mark style="color:$primary;">**Url Produção:**</mark> `https://api.acessorh.com.br`\ <mark style="color:$primary;">**Url Homologação:**</mark> `https://api.rh.homolog.acesso.io`\ <mark style="color:$primary;">**Endpoint:**</mark> `/v1/attachments/:acc`

### **Headers**

| Key                                             | Type   | Description                                                   |
| ----------------------------------------------- | ------ | ------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Token de acesso adquirido pela plataforma Identity (*bearer*) |

### **Path Parameters**

| Key                                   | Type   | Description                   |
| ------------------------------------- | ------ | ----------------------------- |
| acc<mark style="color:red;">\*</mark> | String | UID da empresa. (obrigatorio) |

### **Query Parameters**

| Key   | Type   | Description                                                                                                                  |
| ----- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| limit | String | Quantidade de anexos que devem ser retornados na consulta. Caso não seja passado será retornado os 100 primeiros resultados. |
| skip  | String | Indica a quantidade de anexos que serão pulados (paginação).                                                                 |

{% hint style="warning" %}
Caso não seja inserido os parâmetros `limit` e `skip` , os valores padrões serão, respectivamente, 1000 e 0.

O parâmetro `limit` tem o seu valor máximo como 1000.
{% endhint %}

### Exemplo de requisição  <a href="#exemplo-de-requisicao" id="exemplo-de-requisicao"></a>

```json

curl --location 'https://api.acessorh.com.br/v1/attachments/uid da empresa' \
--header 'Authorization: Bearer token de auth'
```

### Exemplo de response <a href="#exemplo-de-requisicao" id="exemplo-de-requisicao"></a>

{% tabs %}
{% tab title="200 OK: Sucesso" %}

<pre class="language-json" data-overflow="wrap"><code class="lang-json"><strong>{
</strong>  "total": 1,
  "attachments": [
      {
          "categoryID": "fa650c17-1b9d-4189-a02c-bdf23df7ce7c",
          "categoryName": "Anexo tipo A",
          "attachmentID": "7d197b75-e876-4c63-9c11-9631918b5acc",
          "file": {
              "path": "organization/896ffd1d-a3a9-43df-a2e8-eed057fe40e6/attachments/category/fa650c17-1b9d-4189-a02c-bdf23df7ce7c/attachment/7d197b75-e876-4c63-9c11-9631918b5acc/5535ed24-50e1-4879-93a2-6ac9e4941047.pdf",
              "mime": "application/pdf",
              "size": 319626,
              "name": ""
          },
      },
  ],
}
</code></pre>

{% endtab %}

{% tab title="404: Not Found" %}

```json
{
    "total": 0,
    "attachments": null
}
```

{% endtab %}
{% endtabs %}
