---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/directory/patch-office.md
  - href: https://yandex.ru/dev/api360/doc/ru/directory/patch-office.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r21934284
    rel: describedby
sourcePath: docs/dev/api360/concepts/gw/directory/patch-office.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r21934284

<!-- source: ru/openapi/v1directoryorganizationsorg_idofficesoffice_id-patch.md -->
<div class="openapi">

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

<!-- markdownlint-disable-file -->

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

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


## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-patch);margin-bottom: 12px">

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://cloud-api.yandex.net/v1/directory/organizations/{org_id}/offices/{office_id}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_office_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `12345678-90ab-4cde-8f01-234567890abc`
{.table-cell}
||
||

_org_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор организации.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "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"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_address_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Адрес офиса.

_Example:_{.json-schema-reset .json-schema-example} `Москва, улица Примерная, дом 1`
{.table-cell}
||
||

_city_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Москва`
{.table-cell}
||
||

_city_en_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Moscow`
{.table-cell}
||
||

_is_active_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак работающего офиса.
{.table-cell}
||
||

_map_link_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MapLink](#entity-MapLink)

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "href": "https://example.org/offices/main",
  "method": "GET",
  "templated": false
}
```

{% endcut %}
{.table-cell}
||
||

_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Центральный офис`
{.table-cell}
||
||

_name_en_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Head office`
{.table-cell}
||
||

_timezone_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Europe/Moscow`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### MapLink {#entity-MapLink}

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

#|
|| **Name** | **Description** ||
||

_href_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `https://example.org/offices/main`
{.table-cell}
||
||

_method_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Const:_{.json-schema-reset .json-schema-value} `GET`

_Example:_{.json-schema-reset .json-schema-example} `GET`
{.table-cell}
||
||

_templated_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Признак шаблонизированной ссылки. Для ссылки на карту всегда false.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "href": "https://example.org/offices/main",
  "method": "GET",
  "templated": false
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__204">

## 204 No Content

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

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "bad_request",
  "description": "Bad request",
  "message": "Bad request",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Bad request`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `bad_request`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Bad request`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

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

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "forbidden",
  "description": "Forbidden",
  "message": "Forbidden",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Forbidden`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `forbidden`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Forbidden`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "not_found",
  "description": "Not found",
  "message": "Not found",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Not found`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `not_found`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Not found`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__422">

## 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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "invalid_data",
  "description": "Invalid data",
  "message": "Invalid data",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Invalid data`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `invalid_data`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

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

_Example:_{.json-schema-reset .json-schema-example} `Invalid data`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

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

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>
<!-- endsource: ru/openapi/v1directoryorganizationsorg_idofficesoffice_id-patch.md -->


[*Deprecated]: No longer supported, please use an alternative and newer version.