---
title: "Pobierz kraj"
description: "Zakres: `api:invoices:read`. `fields` z `polish_name` 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 › Słowniki

`GET /countries/{id}.json`

Zakres: `api:invoices:read`. `fields` z `polish_name` 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` (`Dictionaries_getCountry.path.id`; integer, required)
  - format `int64`

## Query parameters

- `fields` (`Dictionaries_getCountry.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/countries/12.json \
  --header 'X-inFakt-ApiKey: <X-inFakt-ApiKey>'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "id": 12,
  "alpha_2": "AM",
  "alpha_3": "ARM",
  "english_name": "Armenia",
  "polish_name": "Armenia",
  "continent": "Azja",
  "european_union": false,
  "currency": "AMD"
}
```

- `id` (`Dictionaries_getCountry.response.200.id`; integer, required)
  - format `int64`
- `alpha_2` (`Dictionaries_getCountry.response.200.alpha_2`; string, required) — ISO 3166-1 alpha-2, z wyjątkiem `EL` dla Grecji i `XI` dla Irlandii Północnej. Używaj jako `country` klienta.
  - pattern `^[A-Z]{2}$`
- `alpha_3` (`Dictionaries_getCountry.response.200.alpha_3`; string, required)
  - pattern `^[A-Z]{3}$`
- `english_name` (`Dictionaries_getCountry.response.200.english_name`; string, required)
- `polish_name` (`Dictionaries_getCountry.response.200.polish_name`; string, required)
- `continent` (`Dictionaries_getCountry.response.200.continent`; string, required) — Nazwa kontynentu po polsku.
- `european_union` (`Dictionaries_getCountry.response.200.european_union`; boolean, required, deprecated) — Pole historyczne, zawsze `false`. Nie odzwierciedla członkostwa w UE.
- `currency` (`Dictionaries_getCountry.response.200.currency`; any of, required) — Kod ISO 4217 waluty krajowej.
  - any of: `string`, `null`

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

### 404

Nie znaleziono zasobu.

#### Example

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

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


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