---
title: "🔒 Скачивание ZIP-архива с документами пользователя (паспорт, удостоверение, военный билет и т.д.)."
method: GET
path: "/user/archive-file"
tags: ["Users"]
---

# 🔒 Скачивание ZIP-архива с документами пользователя (паспорт, удостоверение, военный билет и т.д.).

`GET /user/archive-file`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/user/archive-file`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Скачивание ZIP-архива с документами пользователя (паспорт, удостоверение, военный билет и т.д.).

**Access:** `authorized` (10 ) · **allowNullCompany:** true · **Scope:** `read`

**Allows:** `user:documents` (все обязательны; ресурс — `<тип>ID` / `ID` из запроса, `user:*` — `userID` или сам пользователь)

### TypeScript (copy-paste)

**`GET /user/archive-file`**

<details open><summary><b>Params</b></summary>

```typescript
export interface UserArchiveFileParams {
  userID: string
  docsEmployment?: user_archive_file_docsEmployment | null
  docsLibrary?: string | null
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type UserArchiveFileResponse = IServerResponse<Resp_user_archive-file>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `userID` string, uuid, required
- `docsEmployment` 'passportRf' | 'idCard' | 'voennyjBilet' | 'workPermit' | 'vnzh' | 'migrationCard': `passportRf` = "passportRf", `idCard` = "idCard", `voennyjBilet` = "voennyjBilet", `workPermit` = "workPermit", `vnzh` = "vnzh", `migrationCard` = "migrationCard"
- `docsLibrary` string, uuid, nullable

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Response `200`

OK — `IServerResponse<Resp_user_archive-file>`

- object
  - `code` integer, required
  - `data` RespUserArchiveFile, required: Empty response object
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Required parameters missing (docsEmployment or docsLibrary), or no files attached to specified document
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege user:documents required; documents of a user without active access to the company
- `404`: NotFound: Specified user profile does not exist
- `406`: TimeResync — расхождение rts с сервером

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
