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

Merged
merged 2 commits into from
Mar 13, 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
40 changes: 1 addition & 39 deletions docs/employer_negotiations.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,45 +878,7 @@ assessments | массив | [инструменты оценки](assessment.md
<a name="add-messages"></a>
## Отправка сообщения в отклике/приглашении

Обмен сообщениями возможен после приглашения соискателя. О возможности написать
сообщение можно узнать из
[поля `messages_status` в отклике/приглашении](#messaging_status).

### Запрос

`POST /negotiations/{nid}/messages`

где `nid` – идентификатор отклика/приглашения.

Дополнительно необходимо передать параметр `message` - текст сообщения.

### Ответ

Успешный ответ приходит с кодом `201 Created` и не содержит тело.

### Ошибки

* `400 Bad Request` – ошибка в параметрах запроса.
* `403 Forbidden` – отправка сообщения невозможна.
* `404 Not Found` – переданный отклик/приглашение не существует, либо у
текущего менеджера нет прав для работы с ним.

Дополнительно к HTTP коду сервер может вернуть описание
[причины ошибки](errors.md#negotiations).

Например:

* `resume_not_found` – если резюме в отклике/приглашении было скрыто
либо удалено
* `invalid_vacancy` – если вакансия в отклике/приглашении была архивирована
либо скрыта
* `no_invitation` – если отклик/приглашение не в статусе «приглашение».
Например, уже в статусе «отказано» или ещё в статусе «отклик».
* `in_a_row_limit` – если превышено количество последовательных сообщений.
Соискатель должен ответить на сообщение, чтобы появилась возможность писать
вновь.
* `overall_limit` – если превышен лимит сообщений

> !! Данный метод доступен в [OpenAPI](https://api.hh.ru/openapi/redoc#tag/Otklikipriglasheniya-rabotodatelya/operation/send-negotiation-message)

<a name="add-invite"></a>
## Приглашение соискателя на вакансию
Expand Down
42 changes: 1 addition & 41 deletions docs_eng/employer_negotiations.md
Original file line number Diff line number Diff line change
Expand Up @@ -890,47 +890,7 @@ If response/invitation doesn't exist or negotiation not available to the current
<a name="add-messages"></a>
## Sending a message in the response/invitation

Messaging is possible after invitation of the applicant. Find out whether you can
leave the message from
[field `messages_status` in response/invitation](#messaging_status).

### Request

```
POST /negotiations/{nid}/messages
```

where `nid` is the response/invitation ID.

Additionally, the `message` parameter – message text – must be specified.

### Response

Successful server response is returned with `201 Created` code and does not have a body.

### Errors

* `400 Bad Request` – error in the request parameters.
* `403 Forbidden` – message cannot be sent.
* `404 Not Found` – sent response/invitation doesn't exist or current
manager is not authorized to process it.

In addition to an HTTP code, the server can return
[error reason](errors.md#negotiations).

For example:

* `resume_not_found` – if the CV in the response/invitation was hidden
or deleted
* `invalid_vacancy` – if the vacancy in the response/invitation was archived
or hidden
* `no_invitation` – if the response/invitation is not in the "invitation" status.
For example, it is already in the "rejected" status or still in the "response" status.
* `in_a_row_limit` – if the number of successive messages is exceeded.
The applicant must reply to the message in order the employer is able to send
new messages.
* `overall_limit` – if the messages limit is exceeded

>!! Method is defined in [OpenAPI](https://api.hh.ru/openapi/en/redoc#tag/Employer-responsesinvitations/operation/send-negotiation-message)

<a name="add-invite"></a>
## Inviting an applicant for a vacancy
Expand Down
Loading