---
title: "🔒 Обновление элементов справочника компании."
method: POST
path: "/company/dictionary"
tags: ["Company"]
---

# 🔒 Обновление элементов справочника компании.

`POST /company/dictionary`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/company/dictionary`
- 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:** `write`

**Allows:** `company:salaries`, `company:qa-devices` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /company/dictionary`**

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

```typescript
export interface CompanyDictionaryParams {
  ID: string
}
```

</details>

<details open><summary><b>Body</b></summary>

```typescript
export interface CompanyDictionaryBody {
}
```

</details>

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

```typescript
export type CompanyDictionaryResponse = IServerResponse<CompanyDictionary>

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

- `ID` string, uuid, required

## Headers

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

## Request body

- CompanyDictionaryBody: JSON body for `company/dictionary`

## Response `200`

OK — `IServerResponse<CompanyDictionary>`

- object
  - `code` integer, required
  - `data` CompanyDictionary, required: Entity `CompanyDictionary` (table: CompanyDictionary )
    - `ID` string, uuid, required
    - `cID` string, uuid, required
    - `accessType` 0 | 10 | 100, required: `unauthorized` = 0, `authorized` = 10, `administrator` = 100
    - `key` string, required
    - `items` object, required
    - `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 of the dictionary area required (rolesTemplate - company:salaries, qaDevices - company:qa-devices); other dictionaries are managed by their own commands
- `404`: NotFound: Specified company dictionary with ID does not exist
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Items dictionary payload is empty or invalid; QA device fields are invalid (#27002)

---

[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)
