---
title: "🔒 Получение настроек контроля пользователя в компании."
method: GET
path: "/company/control"
tags: ["Company"]
---

# 🔒 Получение настроек контроля пользователя в компании.

`GET /company/control`

## Request

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

Получение настроек контроля пользователя в компании.

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

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

### TypeScript (copy-paste)

**`GET /company/control`**

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

```typescript
export interface CompanyControlParams {
  userID: string
}
```

</details>

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

```typescript
export type CompanyControlResponse = IServerResponse<Resp_company_control>

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

## Headers

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

## Response `200`

OK — `IServerResponse<Resp_company_control>`

- object
  - `code` integer, required
  - `data` RespCompanyControl, required: ResponseData for company/control
    - `controlUser` UserAccess: Entity `UserAccess` (table: UserAccess )
      - `ID` string, uuid, required
      - `cID` string, uuid, required
      - `userID` string, uuid, required
      - `accessType` 0 | 10 | 100, required: `unauthorized` = 0, `authorized` = 10, `administrator` = 100
      - `status` string, required
      - `statusDT` string, date-time, required
      - `statusUID` string, required
      - `hasActiveRole` boolean, nullable
      - `allProductAccess` boolean, nullable
      - `rolesStartDK` integer, nullable: Day key (YYYYMMDD or internal day index)
      - `employment` object, nullable
      - `isOwner` boolean, required
      - `note` object, nullable
      - `params` object, nullable
      - `productAccess` object, nullable
      - `marginPercent` integer, nullable
      - `roles` unknown[], nullable
        - unknown
      - `department` object, nullable
      - `allowsSchemes` object, nullable
      - `allows` object, nullable
      - `allowsTS` integer, nullable: Unix timestamp in milliseconds
      - `updTS` integer, required: Unix timestamp in milliseconds
      - `updUID` string, required
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest / Validation — неверные params/body/headers
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege user:employment required
- `404`: NotFound: Target user profile not found
- `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)
