---
title: "Utwórz dowód wewnętrzny asynchronicznie"
description: "Zakres: `api:invoices:write`. Kolejkuje utworzenie dokumentu i zwraca zadanie.\nTreść żądania jest taka sama jak w synchronicznym endpoincie tworzenia."
---

> 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 › Dowody wewnętrzne

`POST /async/internal_evidences.json`

Zakres: `api:invoices:write`. Kolejkuje utworzenie dokumentu i zwraca zadanie.
Treść żądania jest taka sama jak w synchronicznym endpoincie tworzenia.

## Authentication

Requires one of the following:

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

## Query parameters

- `send_to_ksef` (`InternalEvidences_createAsync.query.send_to_ksef`; boolean, optional) — Wyślij dokument do KSeF po utworzeniu.
- `allow_correction` (`InternalEvidences_createAsync.query.allow_correction`; boolean, optional) — Potwierdź akcję, która skoryguje złożone deklaracje (zamknięty okres księgowy). Bez tego takie żądania zwracają `422` z `errors.allow_correction` albo `errors.locked_accounting`, gdy plan nie pozwala na korekty (wtedy ta flaga jest ignorowana). Można też podać w treści żądania.

## Request body

_Required._

- `internal_evidence` (`InternalEvidences_createAsync.internal_evidence`; object, required)
  - `classification_symbol` (`InternalEvidences_createAsync.internal_evidence.classification_symbol`; string, required) — `sold` (Sprzedaż) albo `salary` (Pozostałe przychody).
    - one of `"sold"`, `"salary"`
  - `service_name` (`InternalEvidences_createAsync.internal_evidence.service_name`; string, required)
  - `number` (`InternalEvidences_createAsync.internal_evidence.number`; string, optional)
  - `invoice_date` (`InternalEvidences_createAsync.internal_evidence.invoice_date`; string, optional) — Domyślnie dzisiaj.
    - format `date`
  - `notes` (`InternalEvidences_createAsync.internal_evidence.notes`; string, optional)
  - `quantity` (`InternalEvidences_createAsync.internal_evidence.quantity`; number, optional)
    - format `double`; default `1`
  - `unit_price` (`InternalEvidences_createAsync.internal_evidence.unit_price`; integer, optional) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
    - format `int64`
  - `total_price` (`InternalEvidences_createAsync.internal_evidence.total_price`; integer, optional) — Nie jest wyliczane z `quantity` i `unit_price`; domyślnie `0`.
    - format `int64`
  - `flat_rate_tax_symbol` (`InternalEvidences_createAsync.internal_evidence.flat_rate_tax_symbol`; string, optional)
  - `reconciliation_id` (`InternalEvidences_createAsync.internal_evidence.reconciliation_id`; string, optional)

## Example request

```json
{
  "internal_evidence": {
    "number": "string",
    "classification_symbol": "sold",
    "invoice_date": "2019-08-24",
    "notes": "string",
    "service_name": "string",
    "quantity": 1,
    "unit_price": 12300,
    "total_price": 12300,
    "flat_rate_tax_symbol": "string",
    "reconciliation_id": "string"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sandbox-infakt.pl/v3/async/internal_evidences.json \
  --header 'Content-Type: application/json' \
  --header 'X-inFakt-ApiKey: <X-inFakt-ApiKey>' \
  --data '
{
  "internal_evidence": {
    "number": "string",
    "classification_symbol": "sold",
    "invoice_date": "2019-08-24",
    "notes": "string",
    "service_name": "string",
    "quantity": 1,
    "unit_price": 12300,
    "total_price": 12300,
    "flat_rate_tax_symbol": "string",
    "reconciliation_id": "string"
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/async/internal_evidences.json';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'X-inFakt-ApiKey': '<X-inFakt-ApiKey>'},
  body: JSON.stringify({
    internal_evidence: {
      number: 'string',
      classification_symbol: 'sold',
      invoice_date: '2019-08-24',
      notes: 'string',
      service_name: 'string',
      quantity: 1,
      unit_price: 12300,
      total_price: 12300,
      flat_rate_tax_symbol: 'string',
      reconciliation_id: 'string'
    }
  })
};

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/async/internal_evidences.json"

payload = { "internal_evidence": {
        "number": "string",
        "classification_symbol": "sold",
        "invoice_date": "2019-08-24",
        "notes": "string",
        "service_name": "string",
        "quantity": 1,
        "unit_price": 12300,
        "total_price": 12300,
        "flat_rate_tax_symbol": "string",
        "reconciliation_id": "string"
    } }
headers = {
    "Content-Type": "application/json",
    "X-inFakt-ApiKey": "<X-inFakt-ApiKey>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Utworzono

#### Example

```json
{
  "invoice_task_reference_number": "4f6a8c1e-2b3d-4e5f-9a7b-8c9d0e1f2a3b",
  "processing_code": 100,
  "processing_description": "Zlecenie przyjęte",
  "action": "create_invoice",
  "invoice_kind": "internal_evidence",
  "timestamps": {
    "task_created_at": "2026-10-02 12:00:00 +0200"
  }
}
```

- `invoice_task_reference_number` (`InternalEvidences_createAsync.response.201.invoice_task_reference_number`; string, required) — Uuid zadania; użyj go w endpoincie statusu.
  - format `uuid`
- `processing_code` (`InternalEvidences_createAsync.response.201.processing_code`; integer, required) — `100` zainicjowane, `120` oczekuje, `140` w trakcie, `201` faktura utworzona, `200` akcja wykonana, `422` błąd (zobacz `invoice_errors`).
  - format `int32`
- `action` (`InternalEvidences_createAsync.response.201.action`; string, required) — `create_invoice` albo `mark_as_paid`.
  - one of `"create_invoice"`, `"mark_as_paid"`
- `timestamps` (`InternalEvidences_createAsync.response.201.timestamps`; object, required)
  - `task_created_at` (`InternalEvidences_createAsync.response.201.timestamps.task_created_at`; string, required)
- `processing_description` (`InternalEvidences_createAsync.response.201.processing_description`; string, optional)
- `invoice_kind` (`InternalEvidences_createAsync.response.201.invoice_kind`; string, optional)
- `invoice_errors` (`InternalEvidences_createAsync.response.201.invoice_errors`; any of, optional) — Błędy, gdy `processing_code` to `422`: błędy pól według nazwy pola w API (lista albo pojedynczy komunikat, np. `{"status": "Faktura już została oznaczona jako zapłacona."}`) albo zwykły komunikat przy nieoczekiwanych błędach.
  - any of: `object`, `string`
- `invoice_uuid` (`InternalEvidences_createAsync.response.201.invoice_uuid`; string, optional) — Ustawiane, gdy faktura już istnieje.
  - format `uuid`

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

### 422

Nie utworzono zadania; szczegóły w `errors`.

#### Example

```json
{
  "errors": {}
}
```

- `errors` (`InternalEvidences_createAsync.response.422.errors`; object, required)

### 423

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

#### Example

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

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


Source: https://docs.niebieskiorzel.pl/api/internal-evidences-create-async/index.md
