Просмотреть контакт

Возвращает информацию об одном внешнем контакте.

Request

GET

https://api360.yandex.net/directory/v1/org/{orgId}/external_contacts/{contactId}

Path parameters

Name

Description

contactId

Type: string

Идентификатор внешнего контакта.

Example: ``

orgId

Type: integer

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

Responses

200 OK

Запрос успешно выполнен.

Body

application/json
{
  "id": "example",
  "firstName": "example",
  "lastName": "example",
  "middleName": "example",
  "title": "example",
  "company": "example",
  "department": "example",
  "address": "example",
  "externalId": "example",
  "emails": [
    {
      "email": "example",
      "type": "example",
      "main": true
    }
  ],
  "phones": [
    {
      "phone": "example",
      "type": "example",
      "main": true
    }
  ],
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-01T00:00:00Z"
}

Name

Description

emails

Type: v1ExternalContactEmail[]

Электронные адреса.

Example
[
  {
    "email": "example",
    "type": "example",
    "main": true
  }
]

firstName

Type: string

Имя.

Example: example

id

Type: string

Идентификатор внешнего контакта.

Example: example

lastName

Type: string

Фамилия.

Example: example

address

Type: string

Почтовый адрес.

Example: example

company

Type: string

Компания.

Example: example

createdAt

Type: string<date-time>

Дата и время создания.

Example: 2025-01-01T00:00:00Z

department

Type: string

Подразделение.

Example: example

externalId

Type: string

Произвольный внешний идентификатор.

Example: example

middleName

Type: string

Отчество.

Example: example

phones

Type: v1ExternalContactPhone[]

Телефоны.

Example
[
  {
    "phone": "example",
    "type": "example",
    "main": true
  }
]

title

Type: string

Должность.

Example: example

updatedAt

Type: string<date-time>

Дата и время изменения.

Example: 2025-01-01T00:00:00Z

v1ExternalContactEmail

Name

Description

email

Type: string

Электронный адрес.

Example: example

main

Type: boolean

Признак основного электронного адреса:

  • true — основной (обязательно должен быть ровно у одного адреса);
  • false — дополнительный.

type

Type: string

Тип электронного адреса. Возможные значения:

  • work — для рабочей почты;
  • для личной почты пользователя оставьте поле незаполненным.

Example: example

Example
{
  "email": "example",
  "type": "example",
  "main": true
}

v1ExternalContactPhone

Name

Description

main

Type: boolean

Признак основного телефона:

  • true — основной (может быть не более чем у одного телефона);
  • false — дополнительный.

phone

Type: string

Телефон.

Example: example

type

Type: string

Тип телефона. Возможные значения:

  • work — рабочий телефон;
  • mobile — мобильный телефон;
  • ip — IP-телефон;
  • для прочих телефонных номеров оставьте поле незаполненным.

Example: example

Example
{
  "phone": "example",
  "type": "example",
  "main": true
}

400 Bad Request

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

Body

application/json
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}

Name

Description

code

Type: integer

Код ошибки.

details

Type: protobufAny[]

Дополнительные сведения об ошибке.

Example
[
  {
    "@type": "example"
  }
]

message

Type: string

Описание ошибки.

Example: example

protobufAny

Name

Description

@type

Type: string

Example: example

[additional]

Type: unknown

Example: null

Example
{
  "@type": "example"
}

401 Unauthorized

Пользователь не авторизован.

Body

application/json
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}

Name

Description

code

Type: integer

Код ошибки.

details

Type: protobufAny[]

Дополнительные сведения об ошибке.

Example
[
  {
    "@type": "example"
  }
]

message

Type: string

Описание ошибки.

Example: example

403 Forbidden

У пользователя или приложения нет прав на доступ к ресурсу, запрос отклонен.

Body

application/json
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}

Name

Description

code

Type: integer

Код ошибки.

details

Type: protobufAny[]

Дополнительные сведения об ошибке.

Example
[
  {
    "@type": "example"
  }
]

message

Type: string

Описание ошибки.

Example: example

404 Not Found

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

Body

application/json
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}

Name

Description

code

Type: integer

Код ошибки.

details

Type: protobufAny[]

Дополнительные сведения об ошибке.

Example
[
  {
    "@type": "example"
  }
]

message

Type: string

Описание ошибки.

Example: example

500 Internal Server Error

Внутренняя ошибка сервиса. Попробуйте повторно отправить запрос через некоторое время.

Body

application/json
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}

Name

Description

code

Type: integer

Код ошибки.

details

Type: protobufAny[]

Дополнительные сведения об ошибке.

Example
[
  {
    "@type": "example"
  }
]

message

Type: string

Описание ошибки.

Example: example

No longer supported, please use an alternative and newer version.