0
Answered

не полные данные при ответе

fred 3 years ago updated 3 years ago 5

делаю запрос: curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Token |мой токен|" -d '{ "query": "малый харитоньевский пер. 10", "count": 3 }' https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address


в ответ получаю поля

{"suggestions":[{"value":"г Москва, пер Харитоньевский М., д 10 стр 1","unrestricted_value":"г Москва, пер Харитоньевский М., д 10 стр 1","data":{"postal_code":"101000","country":"Россия","region_fias_id":"0c5b2444-70a0-4932-980c-b4dc0d3f02b5","region_kladr_id":"7700000000000","region_with_type":"г Москва","region_type":"г","region_type_full":"город","region":"Москва","area_fias_id":null,"area_kladr_id":null,"area_with_type":null,"area_type":null,"area_type_full":null,"area":null,"city_fias_id":"0c5b2444-70a0-4932-980c-b4dc0d3f02b5","city_kladr_id":"7700000000000","city_with_type":"г Москва","city_type":"г","city_type_full":"город","city":"Москва","city_area":null,"city_district":null,"settlement_fias_id":null,"settlement_kladr_id":null,"settlement_with_type":null,"settlement_type":null,"settlement_type_full":null,"settlement":null,"street_fias_id":"83350ebd-2bc0-48ff-b9c8-ea97b67b2b21","street_kladr_id":"77000000000718600","street_with_type":"пер Харитоньевский М.","street_type":"пер","street_type_full":"переулок","street":"Харитоньевский М.","house_fias_id":"f181c7e4-834c-42ee-8624-219a2b5e5e23","house_kladr_id":"7700000000071860006","house_type":"д","house_type_full":"дом","house":"10","block_type":"стр","block_type_full":"строение","block":"1","flat_type":null,"flat_type_full":null,"flat":null,"flat_area":null,"square_meter_price":null,"flat_price":null,"postal_box":null,"fias_id":"f181c7e4-834c-42ee-8624-219a2b5e5e23","fias_level":"8","kladr_id":"7700000000071860006","capital_marker":"0","okato":"45286555000","oktmo":"45375000","tax_office":"7701","tax_office_legal":null,"timezone":null,"geo_lat":null,"geo_lon":null,"beltway_hit":null,"beltway_distance":null,"qc_geo":null,"qc_complete":null,"qc_house":null,"unparsed_parts":null,"qc":null}},{"value":"г Москва, пер Харитоньевский М., д 10 стр 2","unrestricted_value":"г Москва, пер Харитоньевский М., д 10 стр 2","data":{"postal_code":"101000","country":"Россия","region_fias_id":"0c5b2444-70a0-4932-980c-b4dc0d3f02b5","region_kladr_id":"7700000000000","region_with_type":"г Москва","region_type":"г","region_type_full":"город","region":"Москва","area_fias_id":null,"area_kladr_id":null,"area_with_type":null,"area_type":null,"area_type_full":null,"area":null,"city_fias_id":"0c5b2444-70a0-4932-980c-b4dc0d3f02b5","city_kladr_id":"7700000000000","city_with_type":"г Москва","city_type":"г","city_type_full":"город","city":"Москва","city_area":null,"city_district":null,"settlement_fias_id":null,"settlement_kladr_id":null,"settlement_with_type":null,"settlement_type":null,"settlement_type_full":null,"settlement":null,"street_fias_id":"83350ebd-2bc0-48ff-b9c8-ea97b67b2b21","street_kladr_id":"77000000000718600","street_with_type":"пер Харитоньевский М.","street_type":"пер","street_type_full":"переулок","street":"Харитоньевский М.","house_fias_id":"dcaf1053-0842-4a00-9bbc-fac7963e8a29","house_kladr_id":"7700000000071860007","house_type":"д","house_type_full":"дом","house":"10","block_type":"стр","block_type_full":"строение","block":"2","flat_type":null,"flat_type_full":null,"flat":null,"flat_area":null,"square_meter_price":null,"flat_price":null,"postal_box":null,"fias_id":"dcaf1053-0842-4a00-9bbc-fac7963e8a29","fias_level":"8","kladr_id":"7700000000071860007","capital_marker":"0","okato":"45286555000","oktmo":"45375000","tax_office":"7701","tax_office_legal":null,"timezone":null,"geo_lat":null,"geo_lon":null,"beltway_hit":null,"beltway_distance":null,"qc_geo":null,"qc_complete":null,"qc_house":null,"unparsed_parts":null,"qc":null}}]}


очень важны эти поля : "geo_lat":null,"geo_lon":null, но они null, также хотелось бы это поле qc_geo оно тоже нуль

Answer

Answer
Answered

Мы заполняем эти поля только при запросе с count: 1. В JS-плагине это эквивалентно выбору конкретной Подсказки.

Answer
Answered

Мы заполняем эти поля только при запросе с count: 1. В JS-плагине это эквивалентно выбору конкретной Подсказки.

Делаю count 1 тогда ответ пустой

curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Token |мой токен|" -d '{ "query": "малый харитоньевский пер. 10", "count": 1 }' https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address

{"suggestions":[]}

Все спс нашел, не посылать count

А не, не работает

Все нашел слал не на тот адрес