---
title: "Pobierz klienta"
description: "Zakres: `api:invoices:read`. `id` może być identyfikatorem liczbowym albo uuid.\n`fields` z `street_number`, `country_full_name`, `same_forward_address`, `is_vindicable` lub `vindicable_invoices_count` powoduje `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/{id}.json`

Zakres: `api:invoices:read`. `id` może być identyfikatorem liczbowym albo uuid.
`fields` z `street_number`, `country_full_name`, `same_forward_address`, `is_vindicable` lub `vindicable_invoices_count` powoduje `500`.

## Authentication

Requires one of the following:

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

## Path parameters

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

## Query parameters

- `fields` (`Clients_get.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.

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/clients/1003.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/1003.json"

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

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

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "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
}
```

- `id` (`Clients_get.response.200.id`; integer, required)
  - format `int64`
- `uuid` (`Clients_get.response.200.uuid`; string, required)
  - format `uuid`
- `company_name` (`Clients_get.response.200.company_name`; any of, required) — `null`, gdy `business_activity_kind` to `private_person`.
  - any of: `string`, `null`
- `street` (`Clients_get.response.200.street`; any of, required)
  - any of: `string`, `null`
- `street_number` (`Clients_get.response.200.street_number`; any of, required)
  - any of: `string`, `null`
- `flat_number` (`Clients_get.response.200.flat_number`; any of, required)
  - any of: `string`, `null`
- `city` (`Clients_get.response.200.city`; string, required)
- `country` (`Clients_get.response.200.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_get.response.200.country_full_name`; string, required) — Nazwa kraju po polsku.
- `postal_code` (`Clients_get.response.200.postal_code`; any of, required)
  - any of: `string`, `null`
- `nip` (`Clients_get.response.200.nip`; any of, required)
  - any of: `Nip`, `null`
- `phone_number` (`Clients_get.response.200.phone_number`; any of, required)
  - any of: `string`, `null`
- `web_site` (`Clients_get.response.200.web_site`; string, required)
- `email` (`Clients_get.response.200.email`; any of, required) — Do 5 adresów oddzielonych przecinkami.
  - any of: `string`, `null`
- `note` (`Clients_get.response.200.note`; string, required)
- `receiver` (`Clients_get.response.200.receiver`; string, required) — Osoba upoważniona do odbioru dokumentów.
- `mailing_company_name` (`Clients_get.response.200.mailing_company_name`; any of, required) — Pola adresu korespondencyjnego są `""`, gdy `same_forward_address` to `true`.
  - any of: `string`, `null`
- `mailing_street` (`Clients_get.response.200.mailing_street`; any of, required)
  - any of: `string`, `null`
- `mailing_city` (`Clients_get.response.200.mailing_city`; any of, required)
  - any of: `string`, `null`
- `mailing_postal_code` (`Clients_get.response.200.mailing_postal_code`; any of, required)
  - any of: `string`, `null`
- `days_to_payment` (`Clients_get.response.200.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_get.response.200.payment_method`; any of, required) — Domyślna metoda płatności; `""`, gdy nie ustawiono.
  - any of: `PaymentMethod`, `string`
- `invoice_note` (`Clients_get.response.200.invoice_note`; string, required) — Domyślne uwagi do faktur klienta.
- `same_forward_address` (`Clients_get.response.200.same_forward_address`; boolean, required) — Adres korespondencyjny taki sam jak adres firmowy.
- `first_name` (`Clients_get.response.200.first_name`; any of, required)
  - any of: `string`, `null`
- `last_name` (`Clients_get.response.200.last_name`; any of, required)
  - any of: `string`, `null`
- `business_activity_kind` (`Clients_get.response.200.business_activity_kind`; any of, required)
  - any of: `BusinessActivityKind`, `null`
- `is_vindicable` (`Clients_get.response.200.is_vindicable`; boolean, required) — Klient ma przeterminowane faktury, które można skierować do windykacji.
- `vindicable_invoices_count` (`Clients_get.response.200.vindicable_invoices_count`; integer, required)
  - format `int32`

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

### 404

Nie znaleziono zasobu.

#### Example

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

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


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