Изменение параметров офиса организации

Изменяет название, адрес или город офиса организации.

Отправить запрос может администратор организации или сотрудник с ролью Менеджер пользователей.

Request

PATCH

https://cloud-api.yandex.net/v1/directory/organizations/{org_id}/offices/{office_id}

Path parameters

Name

Description

office_id

Type: string

Идентификатор офиса.

Example: 12345678-90ab-4cde-8f01-234567890abc

org_id

Type: integer

Идентификатор организации.

Body

application/json
{
  "name": "Центральный офис",
  "address": "Москва, улица Примерная, дом 1",
  "city": "Москва",
  "name_en": "Head office",
  "city_en": "Moscow",
  "map_link": {
    "href": "https://example.org/offices/main",
    "method": "GET",
    "templated": false
  },
  "is_active": false,
  "timezone": "Europe/Moscow"
}

Name

Description

address

Type: string

Адрес офиса.

Example: Москва, улица Примерная, дом 1

city

Type: string

Город, в котором расположен офис, на русском.

Example: Москва

city_en

Type: string

Город, в котором расположен офис, на английском.

Example: Moscow

is_active

Type: boolean

Признак работающего офиса.

map_link

Type: MapLink

Ссылка на карту или инструкцию, как найти офис или переговорную комнату.

Example
{
  "href": "https://example.org/offices/main",
  "method": "GET",
  "templated": false
}

name

Type: string

Название офиса на русском.

Example: Центральный офис

name_en

Type: string

Название офиса на английском.

Example: Head office

timezone

Type: string

Таймзона офиса. Произвольная строка без проверки идентификатора таймзоны.

Example: Europe/Moscow

Ссылка на карту или инструкцию, как найти офис или переговорную комнату.

Name

Description

href

Type: string

URL со схемой http или https.

Example: https://example.org/offices/main

method

Type: string

HTTP-метод перехода по ссылке.

Const: GET

Example: GET

templated

Type: boolean

Признак шаблонизированной ссылки. Для ссылки на карту всегда false.

Example
{
  "href": "https://example.org/offices/main",
  "method": "GET",
  "templated": false
}

Responses

204 No Content

Офис обновлен.

400 Bad Request

Некорректный запрос.

Body

application/json
{
  "error": "bad_request",
  "description": "Bad request",
  "message": "Bad request",
  "details": {}
}

Name

Description

description

Type: string

Техническое описание ошибки.

Example: Bad request

error

Type: string

Код ошибки

Example: bad_request

message

Type: string

Сообщение об ошибке.

Example: Bad request

details

Type: object

Дополнительные детали ошибки

Example
{}

403 Forbidden

Возможные ошибки:

  • Authorization error
  • SSO user default email change is prohibited
  • SSO user personal info change is prohibited

Body

application/json
{
  "error": "forbidden",
  "description": "Forbidden",
  "message": "Forbidden",
  "details": {}
}

Name

Description

description

Type: string

Техническое описание ошибки.

Example: Forbidden

error

Type: string

Код ошибки

Example: forbidden

message

Type: string

Сообщение об ошибке.

Example: Forbidden

details

Type: object

Дополнительные детали ошибки

Example
{}

404 Not Found

Запрашиваемый ресурс не найден.

Body

application/json
{
  "error": "not_found",
  "description": "Not found",
  "message": "Not found",
  "details": {}
}

Name

Description

description

Type: string

Техническое описание ошибки.

Example: Not found

error

Type: string

Код ошибки

Example: not_found

message

Type: string

Сообщение об ошибке.

Example: Not found

details

Type: object

Дополнительные детали ошибки

Example
{}

422 Unprocessable Entity

Возможные ошибки:

  • Invalid data
  • Missing required field
  • Invalid field value
  • Invalid request body
  • Default email must be one of the user's existing emails
  • Invalid default email
  • Default email cannot be empty
  • Invalid display name
  • Display name cannot be empty

Body

application/json
{
  "error": "invalid_data",
  "description": "Invalid data",
  "message": "Invalid data",
  "details": {}
}

Name

Description

description

Type: string

Техническое описание ошибки.

Example: Invalid data

error

Type: string

Код ошибки

Example: invalid_data

message

Type: string

Сообщение об ошибке.

Example: Invalid data

details

Type: object

Дополнительные детали ошибки

Example
{}
Предыдущая
Следующая