---
title: "Dodaj notatkę do kosztów"
description: "Zakres: `api:costs:read`. Dostępne też jako `create_note_many.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 › Koszty

`POST /documents/costs/create_note.json`

Zakres: `api:costs:read`. Dostępne też jako `create_note_many.json`.

## Authentication

Requires one of the following:

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

## Request body

_Required._

- `content` (`CostDocuments_createNote.content`; string, required)
- `uuids` (`CostDocuments_createNote.uuids`; string, optional) — Identyfikatory uuid oddzielone przecinkami.
- `uuid` (`CostDocuments_createNote.uuid`; string, optional)
  - format `uuid`

## Example requests

### Dodano notatkę

```json
{
  "uuid": "2f6e8a1c-3b4d-4e5f-9a6b-7c8d9e0f1a2b",
  "content": "Do wyjaśnienia z dostawcą"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sandbox-infakt.pl/v3/documents/costs/create_note.json \
  --header 'Content-Type: application/json' \
  --header 'X-inFakt-ApiKey: <X-inFakt-ApiKey>' \
  --data '
{
  "uuid": "2f6e8a1c-3b4d-4e5f-9a6b-7c8d9e0f1a2b",
  "content": "Do wyjaśnienia z dostawcą"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sandbox-infakt.pl/v3/documents/costs/create_note.json';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'X-inFakt-ApiKey': '<X-inFakt-ApiKey>'},
  body: JSON.stringify({
    uuid: '2f6e8a1c-3b4d-4e5f-9a6b-7c8d9e0f1a2b',
    content: 'Do wyjaśnienia z dostawcą'
  })
};

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/documents/costs/create_note.json"

payload = {
    "uuid": "2f6e8a1c-3b4d-4e5f-9a6b-7c8d9e0f1a2b",
    "content": "Do wyjaśnienia z dostawcą"
}
headers = {
    "Content-Type": "application/json",
    "X-inFakt-ApiKey": "<X-inFakt-ApiKey>"
}

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

print(response.text)
```

## Responses

### 200

Sukces

#### Example

```json
{
  "success": true,
  "entities": [
    {
      "uuid": "2f6e8a1c-3b4d-4e5f-9a6b-7c8d9e0f1a2b",
      "number": "FV/123/10/2026",
      "status": "success"
    }
  ]
}
```

- `success` (`CostDocuments_createNote.response.200.success`; boolean, required) — `true`, gdy operacja powiodła się dla wszystkich dokumentów.
- `entities` (`CostDocuments_createNote.response.200.entities`; array<object>, required)
  - `uuid` (`CostDocuments_createNote.response.200.entities.uuid`; string, required) — Uuid dokumentu; dla nieznalezionego uuid wartość taka, jak wysłano.
  - `number` (`CostDocuments_createNote.response.200.entities.number`; string, required) — `""` dla nieznalezionego uuid.
  - `status` (`CostDocuments_createNote.response.200.entities.status`; string, required)
    - one of `"success"`, `"failure"`

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

### 422

Walidacja nie powiodła się; szczegóły w `errors`.

#### Example

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

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


Source: https://docs.niebieskiorzel.pl/api/cost-documents-create-note/index.md
