# API - Chamada API para buscar Arquivos de Atendimento ou Lead

## Listar Arquivos de um Atendimento no SAC360

<mark style="color:green;">`GET`</mark> `/`sac360/list\_file\_attendance/:id

Endpoint completo: <https://sprinthub-api-master.sprinthub.app/sac360/list_file_attendance/XXXX?i=instancia>

i = nome da sua instância

XXXX = ID do Atendimento no SAC360

{% hint style="info" %}
*<mark style="color:purple;">**Para Listar os Atendimentos de um Lead, clique no link abaixo:**</mark>*

[API - Chamada API para Listar Atendimentos de um Lead](/topicos/api/api-chamada-api-para-listar-atendimentos-de-um-lead.md)
{% endhint %}

| Name     | Value   |
| -------- | ------- |
| apitoken | XXXXXXX |

**Resposta**

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

```json
[
    {
        "type": "video",
        "url": "https://mmg.whatsapp.net/v/xxxxxxxx2_5xxxx6_n.enc?ccb=11-4&oh=01xxxxxxFUg&oe=66CEF3DC&_nc_sid=xxxxx3=true",
        "mimetype": "video/mp4",
        "s3url": "https://xxxxxx.amazonaws.com/xxxxxxx/whatsapp/2024/07/xxxxxEF60.mp4",
        "s3urlcurt": "whatsapp/2024/07/xxxxxxEF60.mp4",
        "ext": "mp4"
    },
    {
        "type": "audio",
        "url": "https://mmg.whatsapp.net/v/XXXXXXXy&oe=66CF2DF4&_nc_sid=xxxxxmms3=true",
        "mimetype": "audio/aac",
        "s3url": "https://xxxxxx.amazonaws.com/xxxxxx/whatsapp/2024/07/xxxxxxD1.aac",
        "s3urlcurt": "whatsapp/2024/07/xxxxxx649D1.aac",
        "ext": "aac"
    }
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

**Exemplo no Postman**

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

## Listar Arquivos de um Lead (Lista todos os arquivos de todos os atendimentos do Lead)

<mark style="color:green;">`GET`</mark> `/`sac360/list\_file\_lead/:id

Endpoint completo: <https://sprinthub-api-master.sprinthub.app/sac360/list_file_lead/XXXX?i=instancia>

i = nome da sua instância

XXXX = ID do Lead

**Headers**

| Name     | Value   |
| -------- | ------- |
| apitoken | XXXXXXX |

**Resposta**

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

```json
[
    {
        "type": "video",
        "url": "https://mmg.whatsapp.net/v/xxxxxxxx2_5xxxx6_n.enc?ccb=11-4&oh=01xxxxxxFUg&oe=66CEF3DC&_nc_sid=xxxxx3=true",
        "mimetype": "video/mp4",
        "s3url": "https://xxxxxx.amazonaws.com/xxxx/whatsapp/2024/07/xxxxxEF60.mp4",
        "s3urlcurt": "whatsapp/2024/07/xxxxxxEF60.mp4",
        "ext": "mp4"
    },
    {
        "type": "audio",
        "url": "https://mmg.whatsapp.net/v/XXXXXXXy&oe=66CF2DF4&_nc_sid=xxxxxmms3=true",
        "mimetype": "audio/aac",
        "s3url": "https://xxxxxx.amazonaws.com/xxxx/whatsapp/2024/07/xxxxxxD1.aac",
        "s3urlcurt": "whatsapp/2024/07/xxxxxx649D1.aac",
        "ext": "aac"
    }
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

**Exemplo no Postman**

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


---

# Agent Instructions: 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:

```
GET https://docs.sprinthub.com/topicos/api/api-chamada-api-para-buscar-arquivos-de-atendimento-ou-lead.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
