Company

🔒 Создание новой организации компании.

Создание новой организации компании.

Access: authorized (10 ) · allowNullCompany: true · Scope: write · только веб-сессия

Allows: company:create (все обязательны; без ресурса)

TypeScript (copy-paste)

POST /company/create

<details open><summary><b>Params</b></summary>
export interface CompanyCreateParams {
  skipCreateContent?: boolean | null
}
</details> <details open><summary><b>Body (Partial)</b></summary>
// Patch-body: все поля опциональны (Valid.Patch)
export type CompanyCreateBody = Partial<Resp_company_create>

export interface CompanyCreateBodyFields {
  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>
export type CompanyCreateResponse = IServerResponse<Resp_company_create>

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

Полный файл типов: /docs/types · raw: /docs/api-types.ts

post/company/create

Request

  • Base URL: http://localhost
  • URL: http://localhost/company/create
  • Auth: API key in header sid and API key in header rts and API key in header sig

Query parameters

skipCreateContentboolean nullable

Можно передать header skipCreateContent (сервер мержит headers+query)

Headers

devIDstring uuid required

UUID устройства клиента

tzstring required
Example:Europe/Moscow

Таймзона клиента (IANA или offset)

appstring required
Example:kosmodrom-web

Имя клиентского приложения

appVerstring required
Example:1.0.0

Версия клиента

rKeystring

Уникальный ключ запроса для логов/саппорта

Request body

IDstring uuid
titlestring
logoFIDstring uuid nullable
phonestring
emailstring
urlstring
descriptionstring
addressstring
foundationDTstring date-time nullable
countrystring nullable
defaultMarginPercentinteger nullable
demoSetstring nullable
testSlotinteger nullable
agentPricesobject nullable
timeZonestring
languagestring nullable
activityDescriptionstring nullable
titleHashstring
updTSinteger

Unix timestamp in milliseconds

updUIDstring
createDTstring date-time
createUIDstring

Response

OK — IServerResponse<Resp_company_create>

codeinteger required
srvTSinteger required

Server timestamp (ms)

rkeystring required

Request key

Example response

{
  "code": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.