> For the complete documentation index, see [llms.txt](https://sravni-labs-ru.gitbook.io/sravni-labs.ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sravni-labs-ru.gitbook.io/sravni-labs.ru-docs/kredity-dlya-biznesa-s-podpisaniem-dokumentov-na-storone-partnyora/tekhnicheskaya-dokumentaciya/documents/skachat-dokument-sformirovannyi-dlya-podpisaniya.md).

# Скачать документ, сформированный для подписания

Возвращает документ в виде бинарного потока. Метаданные о документе (`name`, `docType`, `required`) партнёр получает заранее из поля `offers[].documents` ответа `GET /v1/orders/{orderId}`, когда соответствующее предложение банка находится в статусе `WAITING_FOR_SIGNATURE`.

```json
{"openapi":"3.1.0","info":{"title":"API интеграции с партнёрами","version":"2.0.0"},"tags":[{"name":"Documents","description":"Загрузка, подтверждение, скачивание документов и передача подписей к документам"}],"servers":[{"url":"https://sandbox-api.example.ru","description":"Тестовая среда"},{"url":"https://api.example.ru","description":"Промышленная среда"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","description":"OAuth 2.0 client credentials для партнёрского API. Полученный access-токен передаётся во всех методах, кроме `/oauth2/token`, в заголовке `Authorization: Bearer <access_token>`. ","flows":{"clientCredentials":{"tokenUrl":"https://auth.example.ru/oauth2/token","scopes":{}}}}},"parameters":{"OrderId":{"name":"orderId","in":"path","required":true,"description":"Идентификатор заявки на платформе","schema":{"type":"string","format":"uuid"}},"FileId":{"name":"fileId","in":"path","required":true,"description":"Идентификатор документа из массива offers[].documents состояния заявки","schema":{"type":"string","format":"uuid"}}},"responses":{"Unauthorized":{"description":"Bearer-токен отсутствует, недействителен или истёк","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Forbidden":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"DocumentNotFound":{"description":"Документ не существует, либо принадлежит другой заявке или партнёру","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"InternalError":{"description":"Внутренняя ошибка сервиса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"ServiceUnavailable":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Z][A-Z0-9_]*$"},"message":{"type":"string","minLength":1},"details":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"}}}}}},"ErrorDetail":{"type":"object","required":["code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/v1/orders/{orderId}/documents/{fileId}/download":{"get":{"tags":["Documents"],"operationId":"downloadOrderDocument","summary":"Скачать документ, сформированный для подписания","description":"Возвращает документ в виде бинарного потока. Метаданные о документе (`name`, `docType`, `required`) партнёр получает заранее из поля `offers[].documents` ответа `GET /v1/orders/{orderId}`, когда соответствующее предложение банка находится в статусе `WAITING_FOR_SIGNATURE`. ","parameters":[{"$ref":"#/components/parameters/OrderId"},{"$ref":"#/components/parameters/FileId"}],"responses":{"200":{"description":"Бинарное содержимое файла","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/DocumentNotFound"},"409":{"description":"Предложение банка, которому принадлежит документ, находится не в статусе WAITING_FOR_SIGNATURE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```
