---
title: "Utwórz utarg dzienny 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 › Utarg dzienny

`POST /async/daily_revenues.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` (`DailyRevenues_createAsync.query.send_to_ksef`; boolean, optional) — Wyślij dokument do KSeF po utworzeniu.
- `allow_correction` (`DailyRevenues_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._

- `daily_revenue` (`DailyRevenues_createAsync.daily_revenue`; object, required)
  - `issue_date` (`DailyRevenues_createAsync.daily_revenue.issue_date`; string, required)
    - format `date`
  - `vat_exemption_reason` (`DailyRevenues_createAsync.daily_revenue.vat_exemption_reason`; integer, required) — Wymagane, chyba że konto ma domyślną podstawę zwolnienia z VAT. Zobacz `GET /vat_exemptions.json`.
    - format `int64`
  - `number` (`DailyRevenues_createAsync.daily_revenue.number`; string, optional)
  - `description` (`DailyRevenues_createAsync.daily_revenue.description`; string, optional)
  - `notes` (`DailyRevenues_createAsync.daily_revenue.notes`; string, optional)
  - `services` (`DailyRevenues_createAsync.daily_revenue.services`; array<object>, optional)
    - `quantity` (`DailyRevenues_createAsync.daily_revenue.services.quantity`; number, optional)
      - format `double`
    - `unit_price` (`DailyRevenues_createAsync.daily_revenue.services.unit_price`; integer, optional) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
      - format `int64`
    - `total_price` (`DailyRevenues_createAsync.daily_revenue.services.total_price`; integer, optional) — Kwota w groszach (1/100 PLN). `12300` oznacza 123,00 PLN.
      - format `int64`
    - `flat_rate_tax_symbol` (`DailyRevenues_createAsync.daily_revenue.services.flat_rate_tax_symbol`; string, optional)

## Example request

```json
{
  "daily_revenue": {
    "number": "string",
    "description": "string",
    "issue_date": "2019-08-24",
    "notes": "string",
    "vat_exemption_reason": 0,
    "services": [
      {
        "quantity": 0.1,
        "unit_price": 12300,
        "total_price": 12300,
        "flat_rate_tax_symbol": "string"
      }
    ]
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sandbox-infakt.pl/v3/async/daily_revenues.json \
  --header 'Content-Type: application/json' \
  --header 'X-inFakt-ApiKey: <X-inFakt-ApiKey>' \
  --data '
{
  "daily_revenue": {
    "number": "string",
    "description": "string",
    "issue_date": "2019-08-24",
    "notes": "string",
    "vat_exemption_reason": 0,
    "services": [
      {
        "quantity": 0.1,
        "unit_price": 12300,
        "total_price": 12300,
        "flat_rate_tax_symbol": "string"
      }
    ]
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/async/daily_revenues.json';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'X-inFakt-ApiKey': '<X-inFakt-ApiKey>'},
  body: JSON.stringify({
    daily_revenue: {
      number: 'string',
      description: 'string',
      issue_date: '2019-08-24',
      notes: 'string',
      vat_exemption_reason: 0,
      services: [
        {
          quantity: 0.1,
          unit_price: 12300,
          total_price: 12300,
          flat_rate_tax_symbol: '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/daily_revenues.json"

payload = { "daily_revenue": {
        "number": "string",
        "description": "string",
        "issue_date": "2019-08-24",
        "notes": "string",
        "vat_exemption_reason": 0,
        "services": [
            {
                "quantity": 0.1,
                "unit_price": 12300,
                "total_price": 12300,
                "flat_rate_tax_symbol": "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": "daily_revenue",
  "timestamps": {
    "task_created_at": "2026-10-02 12:00:00 +0200"
  }
}
```

- `invoice_task_reference_number` (`DailyRevenues_createAsync.response.201.invoice_task_reference_number`; string, required) — Uuid zadania; użyj go w endpoincie statusu.
  - format `uuid`
- `processing_code` (`DailyRevenues_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` (`DailyRevenues_createAsync.response.201.action`; string, required) — `create_invoice` albo `mark_as_paid`.
  - one of `"create_invoice"`, `"mark_as_paid"`
- `timestamps` (`DailyRevenues_createAsync.response.201.timestamps`; object, required)
  - `task_created_at` (`DailyRevenues_createAsync.response.201.timestamps.task_created_at`; string, required)
- `processing_description` (`DailyRevenues_createAsync.response.201.processing_description`; string, optional)
- `invoice_kind` (`DailyRevenues_createAsync.response.201.invoice_kind`; string, optional)
- `invoice_errors` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_createAsync.response.401.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`DailyRevenues_createAsync.response.401.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`DailyRevenues_createAsync.response.401.url`; string, optional)
- `action_url` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_createAsync.response.402.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`DailyRevenues_createAsync.response.402.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`DailyRevenues_createAsync.response.402.url`; string, optional)
- `action_url` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_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` (`DailyRevenues_createAsync.response.406.limit`; string, optional) — Kod limitu planu, np. `limit_exceeded`, `plan_upgrade_needed`, `cant_add_client`.
- `type` (`DailyRevenues_createAsync.response.406.type`; string, optional)
  - one of `"redirect"`, `"email_not_confirmed"`
- `url` (`DailyRevenues_createAsync.response.406.url`; string, optional)
- `action_url` (`DailyRevenues_createAsync.response.406.action_url`; string, optional)

### 422

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

#### Example

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

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


Source: https://docs.niebieskiorzel.pl/api/daily-revenues-create-async/index.md
