---
title: "Pobierz status integracji z KSeF"
description: "Zakres: `api:invoices:read`. Stan integracji konta z KSeF 2.0."
---

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

`GET /ksef2/integration.json`

Zakres: `api:invoices:read`. Stan integracji konta z KSeF 2.0.

## Authentication

Requires one of the following:

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

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "active": true,
  "costs_last_fetched_at": "2026-10-02T08:00:00Z",
  "incomes_last_fetched_at": "2026-10-02T08:00:00Z",
  "last_check_at": "2026-10-02T09:00:00Z"
}
```

- `active` (`Ksef_getIntegration.response.200.active`; boolean, required)
- `costs_last_fetched_at` (`Ksef_getIntegration.response.200.costs_last_fetched_at`; any of, required)
  - any of: `string`, `null`
- `incomes_last_fetched_at` (`Ksef_getIntegration.response.200.incomes_last_fetched_at`; any of, required)
  - any of: `string`, `null`
- `last_check_at` (`Ksef_getIntegration.response.200.last_check_at`; any of, required)
  - 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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.response.401.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Ksef_getIntegration.response.401.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Ksef_getIntegration.response.401.url`; string, optional)
- `action_url` (`Ksef_getIntegration.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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.response.402.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Ksef_getIntegration.response.402.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Ksef_getIntegration.response.402.url`; string, optional)
- `action_url` (`Ksef_getIntegration.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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.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` (`Ksef_getIntegration.response.406.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`Ksef_getIntegration.response.406.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`Ksef_getIntegration.response.406.url`; string, optional)
- `action_url` (`Ksef_getIntegration.response.406.action_url`; string, optional)

### 422

Nie udało się pobrać statusu integracji z KSeF.

#### Example

```json
{
  "message": "string",
  "code": 0,
  "reason": "string",
  "errors": {
    "result": "error",
    "data": null,
    "_meta": {
      "code": 0,
      "reason": "string",
      "message": "string",
      "errors": {}
    }
  }
}
```

- `message` (`Ksef_getIntegration.response.422.message`; any of, required)
  - any of: `string`, `null`
- `code` (`Ksef_getIntegration.response.422.code`; integer, required)
  - format `int32`
- `reason` (`Ksef_getIntegration.response.422.reason`; string, required)
- `errors` (`Ksef_getIntegration.response.422.errors`; object, required) — Surowa treść błędu usługi integracji.
  - `result` (`Ksef_getIntegration.response.422.errors.result`; string, required)
    - one of `"error"`
  - `data` (`Ksef_getIntegration.response.422.errors.data`; null, required)
  - `_meta` (`Ksef_getIntegration.response.422.errors._meta`; object, required)
    - `code` (`Ksef_getIntegration.response.422.errors._meta.code`; integer, required)
      - format `int32`
    - `reason` (`Ksef_getIntegration.response.422.errors._meta.reason`; string, required)
    - `message` (`Ksef_getIntegration.response.422.errors._meta.message`; string, required)
    - `errors` (`Ksef_getIntegration.response.422.errors._meta.errors`; any of, required)
      - any of: `object`, `null`

### 423

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

#### Example

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

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


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