> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/api/api-api-call-to-fetch-service-or-lead-files.md).

# API - API call to fetch Service or Lead Files

## List Files from a Ticket in SAC360

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

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

i = name of your instance

XXXX = SAC360 Ticket ID

{% hint style="info" %}
*<mark style="color:purple;">**To list the tickets for a Lead, click the link below:**</mark>*

[API - API call to list a Lead's Services](https://docs.sprinthub.com/en/topics/api/api-api-call-to-list-a-leads-services.md)
{% endhint %}

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

**Response**

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

**Postman example**

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FEBxaYnzBEMsCe9Wgmr49%2FCaptura%20de%20tela%202024-07-30%20130750.png?alt=media&amp;token=ae554198-4d69-4fe0-ba1a-24956bb2fd8c" alt=""><figcaption></figcaption></figure>

## List Files from a Lead (Lists all files from all of the Lead's tickets)

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

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

i = name of your instance

XXXX = Lead ID

**Headers**

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

**Response**

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

**Postman example**

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FxGtyoIwfH6bHgkFOE0Ex%2FCaptura%20de%20tela%202024-07-30%20131350.png?alt=media&amp;token=024f7973-8c24-4c9f-af71-b4594d169b8f" alt=""><figcaption></figcaption></figure>
