---
title: "Pobierz listę załączników faktury"
description: "Zakres: `api:invoices:read`."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.niebieskiorzel.pl/llms.txt
> Use this file to discover all available pages before exploring further.

Path: inFakt API › Faktury VAT

`GET /invoices/{invoice_id}/attachments.json`

Zakres: `api:invoices:read`.

## Authentication

Requires one of the following:

- `ApiKey`, apiKey, in header, header `X-inFakt-ApiKey`
- `Token`, apiKey, in header, header `X-Token`

## Path parameters

- `invoice_id` (`Invoices_listAttachments.path.invoice_id`; string, required) — Liczbowe `id` albo `uuid` rekordu.

## Query parameters

- `page` (`Invoices_listAttachments.query.page`; integer, optional) — Numer strony liczony od 1; ignorowany, gdy wysłany jest `offset`.
  - format `int32`; default `1`
- `per_page` (`Invoices_listAttachments.query.per_page`; integer, optional) — Liczba wyników na stronę przy `page`. Serwer jej nie ogranicza.
  - format `int32`; default `10`
- `offset` (`Invoices_listAttachments.query.offset`; integer, optional) — Indeks pierwszego wyniku (liczba pomijanych encji).
  - format `int32`
- `limit` (`Invoices_listAttachments.query.limit`; integer, optional) — Liczba wyników na stronę przy `offset`; domyślnie 10, ignorowana bez `offset`. Większość list bez błędu obniża wartości powyżej 100 do 100.
  - format `int32`
- `pagination_without_total` (`Invoices_listAttachments.query.pagination_without_total`; boolean, optional) — Pomiń liczenie; `metainfo.total_count` przyjmuje wartość `null`.

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.sandbox-infakt.pl/v3/invoices/999/attachments.json \
  --header 'X-inFakt-ApiKey: <X-inFakt-ApiKey>'
```

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/invoices/999/attachments.json';
const options = {method: 'GET', headers: {'X-inFakt-ApiKey': '<X-inFakt-ApiKey>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sandbox-infakt.pl/v3/invoices/999/attachments.json"

headers = {"X-inFakt-ApiKey": "<X-inFakt-ApiKey>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "metainfo": {
    "count": 1,
    "total_count": 1,
    "next": "https://api.infakt.pl/v3/invoices/999/attachments.json?offset=10&limit=10",
    "previous": "https://api.infakt.pl/v3/invoices/999/attachments.json?offset=0&limit=10"
  },
  "entities": [
    {
      "id": 41,
      "name": "protokol-odbioru.pdf",
      "content_type": "application/pdf",
      "download_link": "https://files.infakt.pl/attachments/41/protokol-odbioru.pdf?X-Amz-Expires=300"
    }
  ]
}
```

- `metainfo` (`Invoices_listAttachments.response.200.metainfo`; object, required)
  - `count` (`Invoices_listAttachments.response.200.metainfo.count`; integer, required) — Liczba encji na tej stronie.
    - format `int32`
  - `total_count` (`Invoices_listAttachments.response.200.metainfo.total_count`; any of, required) — Liczba pasujących encji; `null`, gdy `pagination_without_total=true`.
    - any of: `integer`, `null`
  - `next` (`Invoices_listAttachments.response.200.metainfo.next`; string, required) — Bezwzględny URL następnej strony w postaci `offset`/`limit`.
  - `previous` (`Invoices_listAttachments.response.200.metainfo.previous`; string, required) — Bezwzględny URL poprzedniej strony w postaci `offset`/`limit`.
- `entities` (`Invoices_listAttachments.response.200.entities`; array<object>, required)
  - `id` (`Invoices_listAttachments.response.200.entities.id`; integer, required)
    - format `int64`
  - `name` (`Invoices_listAttachments.response.200.entities.name`; string, required)
  - `content_type` (`Invoices_listAttachments.response.200.entities.content_type`; string, required)
  - `download_link` (`Invoices_listAttachments.response.200.entities.download_link`; string, required) — Tymczasowy adres URL do pobrania.

### 401

Brak klucza API, nieprawidłowy klucz albo klucz bez wymaganego zakresu uprawnień.

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.401.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.401.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.401.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.401.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.401.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.401.action_url`; string, optional)

### 402

API niedostępne w obecnym planie (`limit: plan_upgrade_needed`) albo osiągnięty limit dokumentów.

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.402.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.402.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.402.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.402.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.402.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.402.action_url`; string, optional)

### 404

Nie znaleziono zasobu.

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.404.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.404.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.404.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.404.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.404.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.404.action_url`; string, optional)

### 406

Ścieżka nie kończy się na `.json`.

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.406.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.406.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.406.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.406.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.406.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.406.action_url`; string, optional)

### 423

Niepotwierdzony adres e-mail albo wymagana weryfikacja tożsamości.

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.423.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.423.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.423.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.423.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.423.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.423.action_url`; string, optional)

### 429

Przekroczony limit zapytań. Komunikat jest po angielsku, np. `API rate limit exceeded. Try again in 60 seconds.`

#### Example

```json
{
  "error": "Zasób którego szukasz nie został znaleziony."
}
```

- `error` (`Invoices_listAttachments.response.429.error`; any of, optional) — Komunikat po polsku (po angielsku dla `429`). Niektóre akcje zamiast jednego tekstu zwracają listę komunikatów albo błędy walidacji według pól.
  - any of: `string`, `array<string>`, `object`
- `errors` (`Invoices_listAttachments.response.429.errors`; any of, optional) — Błędy walidacji według nazw pól API; na niektórych endpointach zwykły komunikat.
  - any of: `object`, `string`
- `limit` (`Invoices_listAttachments.response.429.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Invoices_listAttachments.response.429.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Invoices_listAttachments.response.429.url`; string, optional)
- `action_url` (`Invoices_listAttachments.response.429.action_url`; string, optional)


Source: https://docs.niebieskiorzel.pl/api/invoices-list-attachments/index.md
