Получение списка офисов организации
Возвращает список офисов организации и позволяет найти офис по его идентификатору.
Отправить запрос может администратор организации или сотрудник с ролью Менеджер пользователей.
Request
GET
https://cloud-api.yandex.net/v1/directory/organizations/{org_id}/offices
Path parameters
|
Name |
Description |
|
org_id |
Type: integer Идентификатор организации. |
Query parameters
|
Name |
Description |
|
ids |
Type: string Идентификаторы офисов, которые должны быть включены в список. Чтобы указать несколько офисов, задайте их идентификаторы через запятую без пробела, например Example: |
|
limit |
Type: integer Максимальное количество записей в ответе. |
|
offset |
Type: integer Смещение, с которого начинается выборка данных. Поддерживаются только значения |
Responses
200 OK
Список офисов организации получен.
Body
application/json
{
"items": [
{
"id": "12345678-90ab-4cde-8f01-234567890abc",
"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",
"created_at": "2026-05-01T10:00:00+00:00",
"updated_at": "2026-05-02T10:00:00+00:00"
}
],
"total": 3,
"limit": 20,
"offset": 0
}
|
Name |
Description |
|
items |
Type: GetOfficesItems Список офисов организации. Example
|
|
limit |
Type: integer Максимальное количество записей в ответе. |
|
offset |
Type: integer Смещение, с которого начинается выборка данных. |
|
total |
Type: integer Общее количество записей, подходящих по параметрам запроса. |
MapLink
Ссылка на карту или инструкцию, как найти офис или переговорную комнату.
|
Name |
Description |
|
href |
Type: string URL со схемой http или https. Example: |
|
method |
Type: string HTTP-метод перехода по ссылке. Const: Example: |
|
templated |
Type: boolean Признак шаблонизированной ссылки. Для ссылки на карту всегда false. |
Example
{
"href": "https://example.org/offices/main",
"method": "GET",
"templated": false
}
OfficesOffice
Данные офиса.
|
Name |
Description |
|
address |
Type: string Адрес офиса. Example: |
|
city |
Type: string Город, в котором расположен офис, на русском. Example: |
|
city_en |
Type: string Город, в котором расположен офис, на английском. Example: |
|
created_at |
Type: string Дата и время создания офиса. Example: |
|
id |
Type: string Идентификатор офиса. Example: |
|
is_active |
Type: boolean Признак работающего офиса. |
|
map_link |
Type: MapLink Ссылка на карту или инструкцию, как найти офис или переговорную комнату. Example
|
|
name |
Type: string Название офиса на русском. Example: |
|
name_en |
Type: string Название офиса на английском. Example: |
|
timezone |
Type: string Таймзона офиса. Произвольная строка без проверки идентификатора таймзоны. Example: |
|
updated_at |
Type: string Дата и время последнего изменения данных офиса. Example: |
Example
{
"id": "12345678-90ab-4cde-8f01-234567890abc",
"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",
"created_at": "2026-05-01T10:00:00+00:00",
"updated_at": "2026-05-02T10:00:00+00:00"
}
GetOfficesItems
Список офисов организации.
Type: OfficesOffice[]
Example
[
{
"id": "12345678-90ab-4cde-8f01-234567890abc",
"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",
"created_at": "2026-05-01T10:00:00+00:00",
"updated_at": "2026-05-02T10:00:00+00:00"
}
]
400 Bad Request
Некорректный запрос.
Body
application/json
{
"error": "bad_request",
"description": "Bad request",
"message": "Bad request",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
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: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
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: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
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: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|