Skip to content

Commit

Permalink
Moved collections and employers' statuses of responses/invitations to…
Browse files Browse the repository at this point in the history
… OpenAPI
  • Loading branch information
DaniilIdrisov committed Feb 26, 2024
1 parent be0d8f7 commit 76f5d1f
Showing 1 changed file with 1 addition and 141 deletions.
142 changes: 1 addition & 141 deletions docs_eng/employer_negotiations.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,147 +114,7 @@ or [individual response/invitation](#get-negotiation)
<a name="collections"></a>
## Collections and employers' statuses of responses/invitations

Collections of responses/invitations are available to the employer. The list of such collections
may vary depending on the specific job.

You can get the jobs for a specific user from the [employer job list](employer_vacancies.md#active).

At the moment, there is no collection that could combine all responses/invitations for a job.
To get a complete list, you need to sequentially request all collections.


### Request

```
GET /negotiations?vacancy_id={vacancy_id}&with_generated_collections={true|false}
```

where `vacancy_id` – ID of the vacancy, `with_generated_collections` - Request additional [generated collections](#term-collection) info, default value - `false`

<a name="collections_response"></a>
### Response

Successful server response is returned with `200 OK` code and contains:

```json
{
"collections": [
{
"id": "somecollection",
"name": "Collection name",
"description": "Collection description",
"url": "https://api.hh.ru/negotiations/somecollection?vacancy_id=123456",
"counters": {
"with_updates": 4,
"total": 5
},
"order_types": [
{
"id": "created_at",
"name": "by created date",
"url": "https://api.hh.ru/negotiations/somecollection?vacancy_id=123456&order_by=created_at"
},
{
"id": "relevance",
"name": "relevance",
"url": "https://api.hh.ru/negotiations/somecollection?vacancy_id=123456&order_by=relevance"
}
]
},
{
"id": "anothercollection",
"name": "Another collection name",
"url": "https://api.hh.ru/negotiations/anothercollection?vacancy_id=123456",
"counters": {
"with_updates": 0,
"total": 1
},
"order_types": [
{
"id": "created_at",
"name": "by created date",
"url": "https://api.hh.ru/negotiations/anothercollection?vacancy_id=123456&order_by=created_at",
}
]
}
],
"generated_collections": [
{
"id": "some_generated_collection",
"name": "Generated collection's name",
"description": "Generated collection's description",
"url": "https://api.hh.ru/negotiations/some_generated_collection?vacancy_id=123456",
"counters": {
"with_updates": 4,
"total": 5
},
"order_types": [
{
"id": "created_at",
"name": "by created date",
"url": "https://api.hh.ru/negotiations/some_generated_collection?vacancy_id=123456&order_by=created_at"
},
{
"id": "relevance",
"name": "relevance",
"url": "https://api.hh.ru/negotiations/some_generated_collection?vacancy_id=123456&order_by=relevance"
}
]
}
],
"employer_states": [
{
"id": "response",
"name": "Response"
},
{
"id": "invitation",
"name": "Invitation"
},
{
"id": "discard",
"name": "Discard"
},
{
"id": "discard",
"name": "Rejection"
},
{
"id": "discard_after_interview",
"name": "Rejected after interview"
}
]
}

```

Name | Type | Description
--- | --- | --------
collections | list | of [collections](#term-collection) of responses/invitations for this vacancy
collections[].id | string | collection ID unique at least for this vacancy
collections[].name | string | collection name
collections[].description | string | collection description
collections[].url | string | URL to send the GET request to in order to get responses/invitations for this collection
collections[].counters.with_updates | number | the number of responses/invitations in this collection that [require attention](#has_updates)
collections[].counters.total | number | the total number of responses/invitations in this collection
collections[].order_types | list | <a name="order-types"></a> possible options for sorting responses/invitations in a collection
generated_collections | list | of generated [collections](#term-collection) of responses/invitations for this vacancy. These collections are not connected with the negotiation status, such as "Consider", "Interview" or "Offer", but are created to facilitate the user's work.
generated_collections[].id | string | collection ID unique at least for this vacancy. Possible variants: vacancy_visitors, relevant_responses, by_location, phone_calls.
generated_collections[].name | string | collection name
generated_collections[].description | string | collection description
generated_collections[].url | string | URL to send the GET request to in order to get responses/invitations for this collection
generated_collections[].counters.with_updates | number | the number of responses/invitations in this collection that [require attention](#has_updates)
generated_collections[].counters.total | number | the total number of responses/invitations in this collection
generated_collections[].order_types | list | <a name="order-types"></a> possible options for sorting responses/invitations in a collection
employer_states | list | of [employer statuses](#term-employer-state) for responses/invitations on the vacancy
employer_states[].id | string | status ID unique at least for this vacancy
employer_states[].name | string | status name

### Errors
* `400 Bad Request` - if parameter `vacancy_id` is not sent or sent bad value
* `404 Not Found` - if the vacancy of requested responses doesn't exist or
not available to the current user

>!! Method is defined in [OpenAPI](https://api.hh.ru/openapi/en/redoc#tag/Employer-responsesinvitations/operation/get-negotiations)
<a name="negotiations-list"></a>
## List of responses/invitation
Expand Down

0 comments on commit 76f5d1f

Please sign in to comment.