> For the complete documentation index, see [llms.txt](https://api-portal.novapost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-portal.novapost.com/methods/ua/overview/invoice-files.md).

# Cупровідні документи

## Завантаження супровідних документів

> Завантажує супровідні документи для відправлення.\
> \
> Метод приймає файли у форматі \`multipart/form-data\`.\
> Кожен файл повинен містити метадані з інформацією про відправлення та документ.\
> \
> \*\*Структура запиту\*\*\
> \- \`files\[0].file\` — бінарний файл.\
> \- \`files\[0].metadata\` — JSON-рядок з метаданими файлу.\
> \
> \*\*Обов’язкові поля метаданих\*\*\
> \- \`menNumber\` — номер відправлення.\
> \- \`name\` — назва файлу.\
> \- \`typeCode\` — короткий код типу документа.\
> \
> \*\*Обмеження\*\*\
> \- Максимальна кількість файлів в одному запиті: \`6\`.\
> \- Максимальний розмір файлу: \`1 MB\`.\
> \- Дублікати назв файлів в межах одного запиту не допускаються.\
> \- Непідтримувані розширення файлів не допускаються.<br>

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[{"name":"Invoice-files"}],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.com/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization JWT-token with a lifetime of 1 hour in header"}}},"paths":{"/shipments/invoice-files":{"post":{"tags":["Invoice-files"],"summary":"Завантаження супровідних документів","description":"Завантажує супровідні документи для відправлення.\n\nМетод приймає файли у форматі `multipart/form-data`.\nКожен файл повинен містити метадані з інформацією про відправлення та документ.\n\n**Структура запиту**\n- `files[0].file` — бінарний файл.\n- `files[0].metadata` — JSON-рядок з метаданими файлу.\n\n**Обов’язкові поля метаданих**\n- `menNumber` — номер відправлення.\n- `name` — назва файлу.\n- `typeCode` — короткий код типу документа.\n\n**Обмеження**\n- Максимальна кількість файлів в одному запиті: `6`.\n- Максимальний розмір файлу: `1 MB`.\n- Дублікати назв файлів в межах одного запиту не допускаються.\n- Непідтримувані розширення файлів не допускаються.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Масив файлів із метаданими.","items":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Бінарний файл."},"metadata":{"type":"string","description":"JSON-рядок, що містить метадані файлу."}}}}}}}}},"responses":{"200":{"description":"Файли успішно завантажено.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"Список завантажених файлів.","items":{"type":"object","properties":{"UUID":{"type":"string","nullable":true,"description":"Унікальний ідентифікатор файлу у сховищі."},"name":{"type":"string","description":"Оригінальна назва файлу."},"status":{"type":"string","description":"Статус завантаження.","enum":["uploaded","failed"]}}}}}}}}},"404":{"description":"Відправлення не знайдено.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","properties":{"errorMessage":{"type":"string"}}}}}}}},"422":{"description":"Помилка валідації.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","properties":{"errorMessage":{"type":"string"}}}}}}}}}}}}}
```

## Отримання списку супровідних документів

> Повертає список супровідних документів, прив’язаних до відправлення.<br>

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[{"name":"Invoice-files"}],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.com/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization JWT-token with a lifetime of 1 hour in header"}}},"paths":{"/shipments/{men}/invoice-files":{"get":{"tags":["Invoice-files"],"summary":"Отримання списку супровідних документів","description":"Повертає список супровідних документів, прив’язаних до відправлення.\n","parameters":[{"name":"men","in":"path","required":true,"schema":{"type":"string"},"description":"Номер відправлення."}],"responses":{"200":{"description":"Список файлів відправлення.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"UUID":{"type":"string"},"name":{"type":"string"},"metadata":{"type":"object","properties":{"typeId":{"type":"string"},"documentType":{"type":"string"},"typeCode":{"type":"string"},"sourceSystem":{"type":"string"},"uploadedAt":{"type":"string","format":"date-time"}}}}}}}}}}},"404":{"description":"Відправлення не знайдено."},"422":{"description":"Помилка валідації."}}}}}}
```

## Видалення супровідних документів

> Видаляє супровідні документи, прив’язані до відправлення.\
> \
> Видалення є незворотним, тому використовуйте метод з обережністю.<br>

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[{"name":"Invoice-files"}],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.com/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization JWT-token with a lifetime of 1 hour in header"}}},"paths":{"/shipments/{men}/invoice-files":{"delete":{"tags":["Invoice-files"],"summary":"Видалення супровідних документів","description":"Видаляє супровідні документи, прив’язані до відправлення.\n\nВидалення є незворотним, тому використовуйте метод з обережністю.\n","parameters":[{"name":"men","in":"path","required":true,"schema":{"type":"string"},"description":"Номер відправлення."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"UUIDs":{"type":"array","description":"Унікальні ідентифікатори файлів.","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Файли успішно оброблено.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"UUID":{"type":"string"},"status":{"type":"string"},"message":{"type":"string","nullable":true}}}}}}}}},"404":{"description":"Відправлення не знайдено."},"422":{"description":"Помилка валідації."}}}}}}
```

## Отримання файлу супровідного документа

> Завантажує файл супровідного документа відправлення.<br>

```json
{"openapi":"3.0.0","info":{"title":"API Nova Post","version":"1.0.0"},"tags":[{"name":"Invoice-files"}],"servers":[{"description":"sandbox","url":"https://api-stage.novapost.com/v.1.0/"},{"description":"production","url":"https://api.novapost.com/v.1.0/"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization JWT-token with a lifetime of 1 hour in header"}}},"paths":{"/shipments/{men}/invoice-files/{uuid}":{"get":{"tags":["Invoice-files"],"summary":"Отримання файлу супровідного документа","description":"Завантажує файл супровідного документа відправлення.\n","parameters":[{"name":"men","in":"path","required":true,"schema":{"type":"string"},"description":"Номер відправлення."},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"},"description":"Унікальний ідентифікатор файлу."}],"responses":{"200":{"description":"Вміст файлу.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Відправлення не знайдено."},"422":{"description":"Помилка валідації."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-portal.novapost.com/methods/ua/overview/invoice-files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
