---
title: "Pobierz deklarację VAT"
description: "Zakres: `api:accounting:read`. Gdy `id` należy do pliku JPK V7, a nie do deklaracji VAT-7, przekierowuje (`302`) na `/saf_v7_files/{id}.json`."
---

> 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 › Podatek VAT

`GET /vat_taxes/{id}.json`

Zakres: `api:accounting:read`. Gdy `id` należy do pliku JPK V7, a nie do deklaracji VAT-7, przekierowuje (`302`) na `/saf_v7_files/{id}.json`.

## Authentication

Requires one of the following:

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

## Path parameters

- `id` (`VatDeclarations_get.path.id`; integer, required)
  - format `int64`

## Query parameters

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

## Header parameters

- `X-inFakt-ApiVersion` (`VatDeclarations_get.header.X-inFakt-ApiVersion`; string, optional) — `3.1` zwraca status deklaracji `sent` zamiast `printed`.
  - one of `"3.1"`

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "id": 1,
  "symbol": "VAT-7",
  "period": "2020-09-01",
  "period_name": "Wrzesień 2020",
  "period_type": "M",
  "correction_counter": 0,
  "payment_date": "2020-10-26",
  "vat_on_sale_price": 230000,
  "vat_on_purchases_price": 46000,
  "overpaid_price": 0,
  "tax_to_pay_price": 184000,
  "status": "paid",
  "sale_in_poland_net_price": 1000000,
  "sale_in_poland_vat_price": 230000,
  "sale_services_abroad_net_price": 0,
  "sale_services_abroad_vat_price": 0,
  "sale_cargo_to_ue_net_price": 0,
  "sale_cargo_to_ue_vat_price": 0,
  "sale_cargo_outside_ue_net_price": 0,
  "sale_cargo_outside_ue_vat_price": 0,
  "purchase_of_fixed_assets_net_price": 0,
  "purchase_of_fixed_assets_vat_price": 0,
  "other_shopping_net_price": 200000,
  "other_shopping_vat_price": 46000,
  "correction_reason": "",
  "edeclaration_enabled": false,
  "real_pay": 184000,
  "tax_office": {
    "info": "",
    "name": "Urząd Skarbowy",
    "bank_name": "Narodowy Bank Polski",
    "account_number": "36101010100000000000000000"
  },
  "extensions": {
    "payments": {
      "enabled": false,
      "pragma_offer_details_link": null
    }
  }
}
```

- `id` (`VatDeclarations_get.response.200.id`; integer, required)
  - format `int64`
- `symbol` (`VatDeclarations_get.response.200.symbol`; string, required) — `PIT-5` (skala podatkowa), `PIT-5L` (podatek liniowy), `PPE` (ryczałt), `VAT-7`, `VAT-7K`, `VAT-UE` lub `VAT-UEK` (korekta).
- `period` (`VatDeclarations_get.response.200.period`; string, required) — Pierwszy dzień okresu.
  - format `date`
- `period_name` (`VatDeclarations_get.response.200.period_name`; string, required)
- `period_type` (`VatDeclarations_get.response.200.period_type`; string, required) — Miesięczny (`M`) lub kwartalny (`Q`).
- `correction_counter` (`VatDeclarations_get.response.200.correction_counter`; integer, required)
  - format `int32`
- `payment_date` (`VatDeclarations_get.response.200.payment_date`; string, required)
  - format `date`
- `status` (`VatDeclarations_get.response.200.status`; string, required) — Status deklaracji: `draft`, `printed`, `sent` lub `paid`. `sent` jest zwracany tylko z nagłówkiem `X-inFakt-ApiVersion: 3.1`, w przeciwnym razie jako `printed`.
- `vat_on_sale_price` (`VatDeclarations_get.response.200.vat_on_sale_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `vat_on_purchases_price` (`VatDeclarations_get.response.200.vat_on_purchases_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `overpaid_price` (`VatDeclarations_get.response.200.overpaid_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `tax_to_pay_price` (`VatDeclarations_get.response.200.tax_to_pay_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_in_poland_net_price` (`VatDeclarations_get.response.200.sale_in_poland_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_in_poland_vat_price` (`VatDeclarations_get.response.200.sale_in_poland_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_services_abroad_net_price` (`VatDeclarations_get.response.200.sale_services_abroad_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_services_abroad_vat_price` (`VatDeclarations_get.response.200.sale_services_abroad_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_cargo_to_ue_net_price` (`VatDeclarations_get.response.200.sale_cargo_to_ue_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_cargo_to_ue_vat_price` (`VatDeclarations_get.response.200.sale_cargo_to_ue_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_cargo_outside_ue_net_price` (`VatDeclarations_get.response.200.sale_cargo_outside_ue_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `sale_cargo_outside_ue_vat_price` (`VatDeclarations_get.response.200.sale_cargo_outside_ue_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `purchase_of_fixed_assets_net_price` (`VatDeclarations_get.response.200.purchase_of_fixed_assets_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `purchase_of_fixed_assets_vat_price` (`VatDeclarations_get.response.200.purchase_of_fixed_assets_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `other_shopping_net_price` (`VatDeclarations_get.response.200.other_shopping_net_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `other_shopping_vat_price` (`VatDeclarations_get.response.200.other_shopping_vat_price`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `correction_reason` (`VatDeclarations_get.response.200.correction_reason`; string, required)
- `edeclaration_enabled` (`VatDeclarations_get.response.200.edeclaration_enabled`; boolean, required)
- `real_pay` (`VatDeclarations_get.response.200.real_pay`; integer, required) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
  - format `int64`
- `tax_office` (`VatDeclarations_get.response.200.tax_office`; object, required)
  - `info` (`VatDeclarations_get.response.200.tax_office.info`; string, required) — Podpowiedź wyświetlana, gdy brakuje numeru rachunku podatkowego; w przeciwnym razie `""`.
  - `name` (`VatDeclarations_get.response.200.tax_office.name`; string, required)
  - `bank_name` (`VatDeclarations_get.response.200.tax_office.bank_name`; string, required)
  - `account_number` (`VatDeclarations_get.response.200.tax_office.account_number`; any of, required) — Indywidualny rachunek podatkowy (mikrorachunek).
    - any of: `string`, `null`
- `extensions` (`VatDeclarations_get.response.200.extensions`; object, required)
  - `payments` (`VatDeclarations_get.response.200.extensions.payments`; object, required) — Płatność online podatku w aplikacji inFakt.
    - `enabled` (`VatDeclarations_get.response.200.extensions.payments.enabled`; boolean, required) — `true`, gdy podatek można teraz zapłacić online.
    - `pragma_offer_details_link` (`VatDeclarations_get.response.200.extensions.payments.pragma_offer_details_link`; null, required)
    - `reason` (`VatDeclarations_get.response.200.extensions.payments.reason`; string, optional) — Powód niedostępności płatności online, np. `Płatność w trakcie przetwarzania`; tylko przy `enabled: false`.
    - `webview` (`VatDeclarations_get.response.200.extensions.payments.webview`; object, optional) — Przy `enabled: true`.
      - `link` (`VatDeclarations_get.response.200.extensions.payments.webview.link`; string, required) — Strona płatności online.
      - `pid` (`VatDeclarations_get.response.200.extensions.payments.webview.pid`; string, required) — Identyfikator płatności bez znaczenia dla klienta API.
    - `link` (`VatDeclarations_get.response.200.extensions.payments.link`; string, optional) — Strona płatności online; przy `enabled: true`.
    - `pid` (`VatDeclarations_get.response.200.extensions.payments.pid`; string, optional) — Przy `enabled: true`.
    - `amount` (`VatDeclarations_get.response.200.extensions.payments.amount`; integer, optional) — Kwota do zapłaty; przy `enabled: true`.
      - format `int64`
    - `fee` (`VatDeclarations_get.response.200.extensions.payments.fee`; integer, optional) — Opłata za płatność; przy `enabled: true`.
      - format `int64`
- `edeclaration_request` (`VatDeclarations_get.response.200.edeclaration_request`; object, optional) — Obecne po wysłaniu deklaracji elektronicznie.
  - `status` (`VatDeclarations_get.response.200.edeclaration_request.status`; string, required)
  - `shippment_date` (`VatDeclarations_get.response.200.edeclaration_request.shippment_date`; string, required)
    - format `date`
  - `description` (`VatDeclarations_get.response.200.edeclaration_request.description`; any of, required)
    - any of: `string`, `null`

### 302

Przekierowanie na plik JPK V7.

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

### 403

Brak uprawnień, limit planu dla tej akcji (`limit`) albo zawieszone konto.

#### Example

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

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

### 404

Nie znaleziono zasobu.

#### Example

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

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


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