diff --git a/docs/areas.md b/docs/areas.md index e2ed95b3..b618ffbb 100644 --- a/docs/areas.md +++ b/docs/areas.md @@ -2,107 +2,10 @@ > ‼️ Внимание! Значения в справочниках могут поменяться в любой момент. Не нужно завязываться на них. -* [Дерево всех регионов](#areas) -* [Справочник регионов, начиная с указанного](#item) -* [Справочник стран](#countries) -* [Дополнительные параметры запроса](#additional_parameters) +* [Дерево всех регионов](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-areas) +* [Справочник регионов, начиная с указанного](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-areas-from-specified) +* [Справочник стран](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-countries) ### Смотрите также * [Подсказки по полному дереву регионов и листам дерева регионов](suggests.md#areas) - - - -## Дерево всех регионов - -`GET /areas` возвращает древовидный список всех регионов с указанием названия -региона, его идентификатором и ссылкой на родительский регион `parent_id`. - -```json -[ - { - "name": "Казахстан", - "id": "40", - "parent_id": null, - "areas": [ - { - "id": "6251", - "parent_id": "40", - "name": "Абай", - "areas": [] - } - ] - } -] -``` - -Пример: [https://api.hh.ru/areas](https://api.hh.ru/areas) - - - -## Справочник регионов, начиная с указанного - -`GET /areas/{area_id}` вернёт древовидный список регионов, начиная с указанного. - -Пример: [https://api.hh.ru/areas/1146](https://api.hh.ru/areas/1146) - - - -## Справочник стран - -`GET /areas/countries` вернёт подмножество регионов, являющихся странами. - -Пример ответа: - -```json -[ - { - "url": "https://api.hh.ru/areas/113", - "id": "113", - "name": "Россия" - }, - { - "url": "https://api.hh.ru/areas/6", - "id": "6", - "name": "Австралия" - } -] -``` - - -## Дополнительные параметры запроса - -Только для русской локализации можно получить дополнительное поле - название area в предложном падеже. Для этого нужно передать query параметр: - -`GET /areas/{area_id}?additional_case=prepositional` - -Пример: [https://api.hh.ru/areas/1?additional_case=prepositional](https://api.hh.ru/areas/1?additional_case=prepositional) - -```json -{ - "id": "1", - "parent_id": "113", - "name": "Москва", - "areas": [], - "name_prepositional": "в Москве" -} -``` - -### Ошибки при запросе - -При передаче не поддерживаемого падежа возвращается ошибка - -`GET /areas/{area_id}?additional_case=wrong_case` - -Пример: [https://api.hh.ru/areas/1?additional_case=wrong_case](https://api.hh.ru/areas/1?additional_case=wrong_case) - -```json -{ - "errors": [ - { - "type": "bad_argument", - "value": "wrong_case" - } - ] -} -``` diff --git a/docs/employer_negotiations.md b/docs/employer_negotiations.md index f1117db7..50e85f92 100644 --- a/docs/employer_negotiations.md +++ b/docs/employer_negotiations.md @@ -277,7 +277,7 @@ per_page | нет | Количество выдаваемых элементов age_from | нет | Возраст соискателя в годах, диапазон от age_to | нет | Возраст соискателя в годах, диапазон до area | нет | Регион. Можно передать множественные значения. Возможные значения: [/areas](https://github.com/hhru/api/blob/master/docs/areas.md) -citizenship | нет | Страна желаемого гражданства. Можно передать множественные значения. Возможные значения можно посмотреть в [справочнике стран](areas.md#countries) +citizenship | нет | Страна желаемого гражданства. Можно передать множественные значения. Возможные значения можно посмотреть в [справочнике стран](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-countries) currency | нет | Код валюты. Возможные значения: `currency` (ключ code) в [/dictionaries](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries driver_license_types | нет | Категории водительских прав. Можно передать множественные значения. Возможные значения: `driver_license_types` в [/dictionaries](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries) educational_institution | нет | Идентификатор [учебного заведения](https://github.com/hhru/api/blob/master/docs/suggests.md). Можно передать множественные значения diff --git a/docs_eng/areas.md b/docs_eng/areas.md index 2bb05169..bf71bd1f 100644 --- a/docs_eng/areas.md +++ b/docs_eng/areas.md @@ -2,104 +2,10 @@ > Attention! The values in the directories may change at any time. Do not address them directly. -* [Tree view of all regions](#areas) -* [Region directory, starting from the indicated region](#item) -* [Countries](#countries) -* [Additional request parameters](#additional_parameters) +* [Tree view of all regions](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-areas) +* [Region directory, starting from the indicated region](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-areas-from-specified) +* [Countries](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-countries) See also: * [Region suggestions](suggests.md#areas) - - - -## Tree view of all regions - -`GET /areas` returns a tree view list of all regions with the indication of -region name and ID and the link to a parent region `parent_id`. - -```json -[ - { - "name": "Kazakhstan", - "id": "40", - "parent_id": null, - "areas": [ - { - "name": "Abai", - "id": "6251", - "parent_id": "40", - "areas": [] - } - ] - } -] -``` - -Example: [https://api.hh.ru/areas?locale=EN](https://api.hh.ru/areas?locale=EN) - - - -## Region directory, starting from the indicated region - -`GET /areas/{area_id}` returns the region tree view list, starting from the -indicated region. - -Example: [https://api.hh.ru/areas/1146?locale=EN](https://api.hh.ru/areas/1146?locale=EN) - - - -## Countires - -`GET /areas/countries` returns the regions list with countries. - -```json -[ - { - "url": "https://api.hh.ru/areas/113", - "id": "113", - "name": "Russia" - }, - { - "url": "https://api.hh.ru/areas/6", - "id": "6", - "name": "Australia" - } -] - ``` - -## Additional request parameters - -Only for Russian localization, you can get an additional field — area name in prepositional case. To do this, pass the query parameter: - -`GET /areas/{area_id}?additional_case=prepositional` - -Example: [https://api.hh.ru/areas/1?additional_case=prepositional](https://api.hh.ru/areas/1?additional_case=prepositional) - -```json -{ - "id": "1", - "parent_id": "113", - "name": "Москва", - "areas": [], - "name_prepositional": "в Москве" -} -``` - -### Errors when querying -Passing an unsupported case returns the error - -`GET /areas/{area_id}?additional_case=wrong_case` - -Example: [https://api.hh.ru/areas/1?additional_case=wrong_case](https://api.hh.ru/areas/1?additional_case=wrong_case) - -```json -{ - "errors": [ - { - "type": "bad_argument", - "value": "wrong_case" - } - ] -} -``` diff --git a/docs_eng/employer_negotiations.md b/docs_eng/employer_negotiations.md index 798245ba..f2a3ee97 100644 --- a/docs_eng/employer_negotiations.md +++ b/docs_eng/employer_negotiations.md @@ -283,7 +283,7 @@ per_page | no | Number of items per page: default value is 20; the maximum value age_from | no | Applicant's age in years, range from age_to | no | Applicant's age in years, range up to area | no | Area. Multiple values can be specified. Possible values: [/areas](https://github.com/hhru/api/blob/master/docs/areas.md) -citizenship | no | Country of desired citizenship. Multiple values can be specified. Possible values can be found in the [country dictionary](areas.md#countries) +citizenship | no | Country of desired citizenship. Multiple values can be specified. Possible values can be found in the [country dictionary](https://api.hh.ru/openapi/en/redoc#tag/Public-directories/operation/get-countries) currency | no | Currency code. Possible values: `currency` (key=code) from [/dictionaries](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries driver_license_types | no | Driver license categories. Multiple values can be specified. Possible values: `driver_license_types` from [/dictionaries](https://api.hh.ru/openapi/redoc#tag/Obshie-spravochniki/operation/get-dictionaries) educational_institution | no | ID of the [educational institution](https://github.com/hhru/api/blob/master/docs_eng/suggests.md). Multiple values can be specified