---
title: "🔒🛡️ Обновление данных и настроек организации."
method: POST
path: "/company/update"
tags: ["Company"]
---

# 🔒🛡️ Обновление данных и настроек организации.

`POST /company/update`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/company/update`
- 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:info` (все обязательны; без ресурса)

### TypeScript (copy-paste)

**`POST /company/update`**

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

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

</details>

<details open><summary><b>Body (Partial)</b></summary>

```typescript
// Patch-body: все поля опциональны (Valid.Patch)
export type CompanyUpdateBody = Partial<Company>

export interface CompanyUpdateBodyFields {
  ID?: string
  title?: string
  logoFID?: string | null
  phone?: string
  email?: string
  url?: string
  description?: string
  address?: string
  foundationDT?: string | null
  country?: string | null
  defaultMarginPercent?: number | null
  demoSet?: string | null
  testSlot?: number | null
  agentPrices?: Record<string, any> | null
  docs?: {
  INN?: string | null
  other1?: string | null
  other2?: string | null
  requisites?: string | null
} | null
  timeZone?: string
  language?: string | null
  activityType?: Array<any> | null
  activityDescription?: string | null
  titleHash?: string
  /** Unix timestamp in milliseconds */
  updTS?: number
  updUID?: string
  createDT?: string
  createUID?: string
}
```

</details>

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

```typescript
export type CompanyUpdateResponse = IServerResponse<Company>

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

- CompanyUpdateBody: Partial body (Valid.Patch) for `company/update` — все поля опциональны
  - `ID` string, uuid
  - `title` string
  - `logoFID` string, uuid, nullable
  - `phone` string
  - `email` string
  - `url` string
  - `description` string
  - `address` string
  - `foundationDT` string, date-time, nullable
  - `country` string, nullable
  - `defaultMarginPercent` integer, nullable
  - `demoSet` string, nullable
  - `testSlot` integer, nullable
  - `agentPrices` object, nullable
  - `docs` object, nullable
    - `INN` string, uuid, nullable
    - `other1` string, uuid, nullable
    - `other2` string, uuid, nullable
    - `requisites` string, uuid, nullable
  - `timeZone` string
  - `language` string, nullable
  - `activityType` unknown[], nullable
    - unknown
  - `activityDescription` string, nullable
  - `titleHash` string
  - `updTS` integer: Unix timestamp in milliseconds
  - `updUID` string
  - `createDT` string, date-time
  - `createUID` string

## Response `200`

OK — `IServerResponse<Company>`

- object
  - `code` integer, required
  - `data` Company, required: Entity `Company` (table: Company )
    - `ID` string, uuid, required
    - `title` string, required
    - `logoFID` string, uuid, nullable
    - `phone` string, required
    - `email` string, required
    - `url` string, required
    - `description` string, required
    - `address` string, required
    - `foundationDT` string, date-time, nullable
    - `country` string, nullable
    - `defaultMarginPercent` integer, nullable
    - `demoSet` string, nullable
    - `testSlot` integer, nullable
    - `agentPrices` object, nullable
    - `docs` object, nullable
      - `INN` string, uuid, nullable
      - `other1` string, uuid, nullable
      - `other2` string, uuid, nullable
      - `requisites` string, uuid, nullable
    - `timeZone` string
    - `language` string, nullable
    - `activityType` unknown[], nullable
      - unknown
    - `activityDescription` string, nullable
    - `titleHash` string, required
    - `updTS` integer, required: Unix timestamp in milliseconds
    - `updUID` string, required
    - `createDT` string, date-time, required
    - `createUID` string, required
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Invalid company title format
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege company:info required
- `404`: NotFound: Company with specified ID does not exist
- `406`: TimeResync — расхождение rts с сервером
- `422`: UnprocessableContent: Company with specified title already exists

---

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