L
L
lilandre2017-10-08 10:33:43
JavaScript
lilandre, 2017-10-08 10:33:43

How do I work with the Nova Poshta API?

Good afternoon. I need to make such an order form, in which, when choosing a city, in another imput, when entering a street, hints of street names will be substituted. For this I have to use the New Mail API. Documentation
I've never done this before. The request code looks like this -

{
"modelName": "Address",
"calledMethod": "getCities",
"methodProperties": {
"Ref": "ebc0eda9-93ec-11e3-b441-0050568002cf"
},
"apiKey": "[ВАШ КЛЮЧ]"
}

And the answer
{
"modelName": "Address",
"calledMethod": "getCities",
"methodProperties": {
"Ref": "ebc0eda9-93ec-11e3-b441-0050568002cf"
},
"apiKey": "[ВАШ КЛЮЧ]"
}

59d9d4b0a3539684355964.png
Where should I move?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lilandre, 2017-10-10
@lilandre

It turned out that I formulated the request incorrectly.

N
Nikola24, 2017-10-08
@Nikola24

As I understand it, you need to add the "FindByString": "" key to the methodProperties object, enter the city you need and send the request
. It looks like this:

{
"modelName": "Address",
"calledMethod": "getCities",
"methodProperties": {
"Ref": "ebc0eda9-93ec-11e3-b441-0050568002cf",
"FindByString":  Прописываете сюда город 
},
"apiKey": "[ВАШ КЛЮЧ]"
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question