Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Перевели получение списка откликов в OpenAPI #804

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 1 addition & 103 deletions docs/negotiations.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,109 +27,7 @@
<a name="get_negotiations"></a>
## Получение списка откликов

### Запрос

```
GET /negotiations
```

Помимо стандартных параметров пагинации `page` и `per_page`, поддерживаются:

Имя | Обязательный | Описание
--- | ------------ | ---
order_by | нет | тип сортировки, возможные значения указаны в [справочнике `negotiations_order`](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries)
order | нет | направление сортировки. Возможные значения: `asc`, `desc`.
vacancy_id | нет | фильтр по id вакансии
status | нет | учитывать только отклики находящиеся в определенном статусе. Возможные значения указаны в [справочнике `applicant_negotiation_status`](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries)
has_updates | нет | учитывать только отклики, для которых есть непросмотренные сообщения. Возможные значения: `true`, `false`

По умолчанию отклики сортируются по последнему обновлению от новых к старым.


### Ответ

Успешный ответ приходит с кодом `200 OK` и содержит:

```javascript
{
"found": 1,
"pages": 1,
"per_page": 20,
"page": 0,
"items": [
{
"id": "123",
"state": {
"id": "invitation",
"name": "Приглашение"
},
"hidden": false,
"created_at": "2013-10-05T19:51:38+0400",
"updated_at": "2013-10-07T18:30:57+0400",
"url": "https://api.hh.ru/negotiations/123",
"resume": {},
"vacancy": {},
"phone_calls": {
"picked_up_phone_by_opponent": true,
"items": [
{
"id": 123,
"status": "call_in_progress",
"creation_time": "2022-03-04T16:39:58.857853Z",
"last_change_time": null,
"duration_seconds": null
},
{
"id": 111,
"status": "call_ended",
"creation_time": "2022-03-01T16:39:58.857853Z",
"last_change_time": "2022-03-01T16:41:58.857853Z",
"duration_seconds": 120
}
]
},
"has_updates": true,
"viewed_by_opponent": true,
"messaging_status": "ok",
"decline_allowed": true,
"source": "NEGOTIATION",
}
// , .....
]
}
```

где:

Имя | Тип | Описание
--- | --- | ---
found | число | Количество найденных откликов ( ≥ 0 )
pages | число | Количество страниц с откликами ( ≥ 1 )
per_page | число | Количество элементов на страницу ( > 0 )
page | число | Номер текущей страницы ( ≥ 0 )

В элементе `items` содержатся данные об откликах:

Имя | Тип | Описание
--- | --- | ---
id | строка | Идентификатор отклика
state | объект | Текущее состояние отклика. Разрешенные значения находятся в справочнике [/dictionaries](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries) в разделе ```negotiations_state```
hidden | логический | Скрыт ли текущий отклик (True - отклик скрыт, False - отклик активен)
created_at | строка | Дата и время создания отклика
updated_at | строка | Дата и время последнего обновления отклика
url | строка | Ссылка на полную версию отклика
resume | объект, null | [Короткое представление резюме](employer_resumes.md#resume-nano)
vacancy | объект, null | [Короткое представление вакансии](vacancies.md#nano)
phone_calls | объект, null | [Представление истории звонков по вакансии](phone_calls.md)
has_updates | логический | Есть ли непросмотренные сообщения в отклике. Флаг сбрасывается при различных действиях по отклику, например, [просмотре списка сообщений](#get_messages).
viewed_by_opponent | логический | Был ли отклик просмотрен работодателем
messaging_status | строка | Текущий статус переписки. Возможные значения находятся в [справочнике `messaging_status`](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries).
decline_allowed | Логический | Возможно ли [скрыть отклик](#hide_message) вместе с сообщением работодателю об отказе
source | строка | Источник отклика. Возможные значения NEGOTIATION, PHONE_CALL, CHAT, VR.
job_search_status | объект, null | [Статус поиска работы кандидатом](https://api.hh.ru/openapi/redoc#tag/Prosmotr-rezyume/operation/get-resume). Для получения данных нужно передать параметр `with_job_search_status=true`.

В объекте вакансии ключи `url` и `alternate_url` могут быть `null`, если вакансия недоступна (удалена).

> !! Данный метод доступен в [OpenAPI](https://api.hh.ru/openapi/redoc#tag/Perepiska-(otklikipriglasheniya)-dlya-soiskatelya/operation/get-negotiations)

<a name="get_negotiations_active"></a>
## Получение списка активных откликов
Expand Down
79 changes: 1 addition & 78 deletions docs_eng/negotiations.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,84 +26,7 @@ state.
<a name="get_negotiations"></a>
## Receiving the list of responses

### Request

```
GET /negotiations
```

Parameters:

Name| Required| Description
--- | --- | ---
page| no| Page number, default: 0
per_page| no| Number of elements displayed per page, default is 20.
order_by| no| The field to sort the displayed data by. Possible values: `updated_at`, `created_at`. Default: `updated_at`
order| no| Sort order. Possible values: `asc`, `desc`. Default: `desc`
vacancy_id| no| Filter by a vacancy id
has_updates| no| Display elements only with unread messages. Possible values: `true`, `false`


### Response

```javascript
{
"found": 1,
"pages": 1,
"per_page": 20,
"page": 0,
"items": [
{
"id": "123",
"state": {
"id": "invitation",
"name": "Invitation"
},
"hidden": false,
"created_at": "2013-10-05T19:51:38+0400",
"updated_at": "2013-10-07T18:30:57+0400",
"url": "https://api.hh.ru/negotiations/123",
"resume": {},
"vacancy": {},
"has_updates": true,
"viewed_by_opponent": true,
"messaging_status": "ok",
"decline_allowed": true
}
// , .....
]
}
```

where:

Name| Type| Description
--- | --- | ---
found| number| Number of responses found ( ≥ 0 )
pages| number| Number of pages with responses ( ≥ 1 )
per_page| number| Number of elements per page ( > 0 )
page| number| Number of the current page ( ≥ 0 )

The `items` entity contains response data:

Name| Type| Description
--- | --- | ---
id| string| Response ID
state| object| Current state of the application. Allowed values are listed in the [/dictionaries](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-dictionaries) reference, section ```negotiations_state```
hidden| logical| Whether the current response is hidden (True – the response is hidden, False – the response is active)
created_at| string| Response creation date and time
updated_at| string| Response update date and time
url| string| Link to the full response
resume| object, null| CV short view
vacancy| object, null| [Vacancy short view](vacancies.md#nano)
has_updates | logical | Are there any unread messages in the topic. The flag is reset by a variety of response acts, such as [viewing the list of messages](#get_messages).
viewed_by_opponent| logical| Whether the response was viewed by the employer
messaging_status | string | The current messaging status. Possible values are in the [`messaging_status` directory](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-dictionaries).
decline_allowed | logical | If available [hide the response](#hide_message) with decline message to employer

Within the vacancy object, keys `url` and `alternate_url` can be `null` if the
vacancy is unavailable (deleted).

>!! Method is defined in [OpenAPI](https://api.hh.ru/openapi/en/redoc#tag/Negotiations-(responsesinvitations)-for-applicants/operation/get-negotiations)

<a name="get_negotiations_active"></a>
## Receiving the list of active responses
Expand Down
Loading