---
title: "Pobierz listę klientów"
description: "Zakres: `api:invoices:read`. Sortowanie po `company_name`, chyba że podano `order`.\n\n`fields`, `order` i filtry nie działają z `street_number`, `country_full_name`, `same_forward_address`,\n`is_vindicable` i `vindicable_invoices_count`; w `fields` powodują `500`."
---

> 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 › Klienci

`GET /clients.json`

Zakres: `api:invoices:read`. Sortowanie po `company_name`, chyba że podano `order`.

`fields`, `order` i filtry nie działają z `street_number`, `country_full_name`, `same_forward_address`,
`is_vindicable` i `vindicable_invoices_count`; w `fields` powodują `500`.

## Authentication

Requires one of the following:

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

## Query parameters

- `page` (`Clients_list.query.page`; integer, optional) — Numer strony liczony od 1; ignorowany, gdy wysłany jest `offset`.
  - format `int32`; default `1`
- `per_page` (`Clients_list.query.per_page`; integer, optional) — Liczba wyników na stronę przy `page`. Serwer jej nie ogranicza.
  - format `int32`; default `10`
- `offset` (`Clients_list.query.offset`; integer, optional) — Indeks pierwszego wyniku (liczba pomijanych encji).
  - format `int32`
- `limit` (`Clients_list.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` (`Clients_list.query.pagination_without_total`; boolean, optional) — Pomiń liczenie; `metainfo.total_count` przyjmuje wartość `null`.
- `fields` (`Clients_list.query.fields`; string, optional) — Zawężenie pól: nazwy pól API rozdzielone przecinkami, np. `id,company_name`; `id` jest zwykle dodawane. Odpowiedź zawiera wtedy tylko te pola, więc nie odpowiada pełnemu schematowi. Pola wyliczane, a nie zapisywane, mogą kończyć się błędem `500`; operacja je wymienia.
- `order` (`Clients_list.query.order`; string, optional) — Sortowanie: `<pole>`, `<pole> asc` albo `<pole> desc` z nazwą pola API, np. `name desc`. Pole, po którym nie da się sortować, jest ignorowane bez błędu.
- `q[company_name_cont]` (`Clients_list.query.q[company_name_cont]`; string, optional) — Nazwa firmy zawiera.
- `q[nip_eq]` (`Clients_list.query.q[nip_eq]`; string, optional) — NIP równy, dokładnie tak jak zapisany (z myślnikami lub bez).
- `q[clean_nip_eq]` (`Clients_list.query.q[clean_nip_eq]`; string, optional) — Cyfry NIP równe, z pominięciem myślników, spacji i prefiksu kraju po obu stronach, np. `5260250274`.
- `q[email_cont]` (`Clients_list.query.q[email_cont]`; string, optional) — E-mail zawiera.
- `q[business_activity_kind_eq]` (`Clients_list.query.q[business_activity_kind_eq]`; string, optional) — Forma prawna klienta.
  - one of `"private_person"`, `"self_employed"`, `"other_business"`

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/clients.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/clients.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/clients.json?q%5Bcompany_name_cont%5D=Testowa&offset=10&limit=10",
    "previous": "https://api.infakt.pl/v3/clients.json?q%5Bcompany_name_cont%5D=Testowa&offset=0&limit=10"
  },
  "entities": [
    {
      "id": 1003,
      "uuid": "aae6796c-30a9-4bc6-ae55-6b2f08a8a0f6",
      "company_name": "Pierwsza Testowa Spółka sp z o.o.",
      "street": "Lwowska",
      "street_number": "10",
      "flat_number": "17",
      "city": "Kraków",
      "country": "PL",
      "country_full_name": "Polska",
      "postal_code": "31-202",
      "nip": "222-22-22-222",
      "phone_number": "500100200",
      "web_site": "",
      "email": "biuro@example.com",
      "note": "",
      "receiver": "",
      "mailing_company_name": "",
      "mailing_street": "",
      "mailing_city": "",
      "mailing_postal_code": "",
      "days_to_payment": "",
      "payment_method": "",
      "invoice_note": "",
      "same_forward_address": true,
      "first_name": null,
      "last_name": null,
      "business_activity_kind": "other_business",
      "is_vindicable": false,
      "vindicable_invoices_count": 0
    }
  ]
}
```

- `metainfo` (`Clients_list.response.200.metainfo`; object, required)
  - `count` (`Clients_list.response.200.metainfo.count`; integer, required) — Liczba encji na tej stronie.
    - format `int32`
  - `total_count` (`Clients_list.response.200.metainfo.total_count`; any of, required) — Liczba pasujących encji; `null`, gdy `pagination_without_total=true`.
    - any of: `integer`, `null`
  - `next` (`Clients_list.response.200.metainfo.next`; string, required) — Bezwzględny URL następnej strony w postaci `offset`/`limit`.
  - `previous` (`Clients_list.response.200.metainfo.previous`; string, required) — Bezwzględny URL poprzedniej strony w postaci `offset`/`limit`.
- `entities` (`Clients_list.response.200.entities`; array<object>, required)
  - `id` (`Clients_list.response.200.entities.id`; integer, required)
    - format `int64`
  - `uuid` (`Clients_list.response.200.entities.uuid`; string, required)
    - format `uuid`
  - `company_name` (`Clients_list.response.200.entities.company_name`; any of, required) — `null`, gdy `business_activity_kind` to `private_person`.
    - any of: `string`, `null`
  - `street` (`Clients_list.response.200.entities.street`; any of, required)
    - any of: `string`, `null`
  - `street_number` (`Clients_list.response.200.entities.street_number`; any of, required)
    - any of: `string`, `null`
  - `flat_number` (`Clients_list.response.200.entities.flat_number`; any of, required)
    - any of: `string`, `null`
  - `city` (`Clients_list.response.200.entities.city`; string, required)
  - `country` (`Clients_list.response.200.entities.country`; string, required) — Dwuliterowy kod kraju jak `alpha_2` w `GET /countries.json`: ISO 3166-1 alpha-2, z wyjątkiem `EL` dla Grecji (`GR` nie jest rozpoznawany) i `XI` dla Irlandii Północnej.
    - pattern `^[A-Z]{2}$`
  - `country_full_name` (`Clients_list.response.200.entities.country_full_name`; string, required) — Nazwa kraju po polsku.
  - `postal_code` (`Clients_list.response.200.entities.postal_code`; any of, required)
    - any of: `string`, `null`
  - `nip` (`Clients_list.response.200.entities.nip`; any of, required)
    - any of: `Nip`, `null`
  - `phone_number` (`Clients_list.response.200.entities.phone_number`; any of, required)
    - any of: `string`, `null`
  - `web_site` (`Clients_list.response.200.entities.web_site`; string, required)
  - `email` (`Clients_list.response.200.entities.email`; any of, required) — Do 5 adresów oddzielonych przecinkami.
    - any of: `string`, `null`
  - `note` (`Clients_list.response.200.entities.note`; string, required)
  - `receiver` (`Clients_list.response.200.entities.receiver`; string, required) — Osoba upoważniona do odbioru dokumentów.
  - `mailing_company_name` (`Clients_list.response.200.entities.mailing_company_name`; any of, required) — Pola adresu korespondencyjnego są `""`, gdy `same_forward_address` to `true`.
    - any of: `string`, `null`
  - `mailing_street` (`Clients_list.response.200.entities.mailing_street`; any of, required)
    - any of: `string`, `null`
  - `mailing_city` (`Clients_list.response.200.entities.mailing_city`; any of, required)
    - any of: `string`, `null`
  - `mailing_postal_code` (`Clients_list.response.200.entities.mailing_postal_code`; any of, required)
    - any of: `string`, `null`
  - `days_to_payment` (`Clients_list.response.200.entities.days_to_payment`; any of, required) — Domyślny termin płatności w dniach dla tego klienta; `""`, gdy nie ustawiono.
    - any of: `integer`, `string`
  - `payment_method` (`Clients_list.response.200.entities.payment_method`; any of, required) — Domyślna metoda płatności; `""`, gdy nie ustawiono.
    - any of: `PaymentMethod`, `string`
  - `invoice_note` (`Clients_list.response.200.entities.invoice_note`; string, required) — Domyślne uwagi do faktur klienta.
  - `same_forward_address` (`Clients_list.response.200.entities.same_forward_address`; boolean, required) — Adres korespondencyjny taki sam jak adres firmowy.
  - `first_name` (`Clients_list.response.200.entities.first_name`; any of, required)
    - any of: `string`, `null`
  - `last_name` (`Clients_list.response.200.entities.last_name`; any of, required)
    - any of: `string`, `null`
  - `business_activity_kind` (`Clients_list.response.200.entities.business_activity_kind`; any of, required)
    - any of: `BusinessActivityKind`, `null`
  - `is_vindicable` (`Clients_list.response.200.entities.is_vindicable`; boolean, required) — Klient ma przeterminowane faktury, które można skierować do windykacji.
  - `vindicable_invoices_count` (`Clients_list.response.200.entities.vindicable_invoices_count`; integer, required)
    - format `int32`

### 400

Nieprawidłowe parametry wyszukiwania (`q[...]`); na niektórych endpointach także nieprawidłowe parametry stronicowania.

#### Example

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

- `error` (`Clients_list.response.400.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` (`Clients_list.response.400.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` (`Clients_list.response.400.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.400.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.400.url`; string, optional)
- `action_url` (`Clients_list.response.400.action_url`; string, optional)

### 401

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

#### Example

```json
{
  "error": "Klucz API który podałeś jest nieprawidłowy."
}
```

- `error` (`Clients_list.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` (`Clients_list.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` (`Clients_list.response.401.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.401.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.401.url`; string, optional)
- `action_url` (`Clients_list.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` (`Clients_list.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` (`Clients_list.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` (`Clients_list.response.402.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.402.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.402.url`; string, optional)
- `action_url` (`Clients_list.response.402.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` (`Clients_list.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` (`Clients_list.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` (`Clients_list.response.406.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.406.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.406.url`; string, optional)
- `action_url` (`Clients_list.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` (`Clients_list.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` (`Clients_list.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` (`Clients_list.response.423.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.423.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.423.url`; string, optional)
- `action_url` (`Clients_list.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` (`Clients_list.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` (`Clients_list.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` (`Clients_list.response.429.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Clients_list.response.429.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Clients_list.response.429.url`; string, optional)
- `action_url` (`Clients_list.response.429.action_url`; string, optional)


Source: https://docs.niebieskiorzel.pl/api/clients-json/list/index.md
