Distance calculator

FREEMIUM
By Oleksii Neishchenko | Updated il y a 17 jours | Location
Popularity

9.3 / 10

Latency

175ms

Service Level

100%

Health Check

N/A

Back to All Discussions

422 error

Rapid account: Ianmckintosh 1969
ianmckintosh1969
il y a 8 mois

I just signed up for the API service but getting a 422 error when attempting to call. Any suggestions are appreciated.

Rapid account: Ianmckintosh 1969
ianmckintosh1969 Commented il y a 8 mois

just sent.

Rapid account: Api Ocean
ApiOcean Commented il y a 8 mois

I have not used this software, but I can try to help.
Could you send me screenshots of the request settings to o.neishch@gmail.com?

Rapid account: Ianmckintosh 1969
ianmckintosh1969 Commented il y a 8 mois

Unfortunately, it is not a common language. I am making the calls from within a vendor provided application which supports REST API calls. The application is from Jack Henry.

Rapid account: Api Ocean
ApiOcean Commented il y a 8 mois

What programming language and technology do you use?

Rapid account: Ianmckintosh 1969
ianmckintosh1969 Commented il y a 8 mois

Not sure how I can pass the following as a query string.

{
“start_point”:"(1234,-1234)"
“end_point_1”:"(2345,-2345)"
“unit”:“miles”
}

I changed it to be in the body of a REST call but that resulted in no parameters being sent.

Rapid account: Api Ocean
ApiOcean Commented il y a 8 mois

Now the parameters look like this:
{
"{start_point:(1234,1234)end_point_1:(2345,2345)end_point_2:(3456,-3456)unit:milesdecimal_places:2}":true
}

That is, there should be 5 separate parameters: start_point, end_point_1, end_point_2, unit, decimal_places
Instead, there is a single parameter that contains a mix of all 5 parameters in its name and has a value of “true”

Rapid account: Api Ocean
ApiOcean Commented il y a 8 mois

In the last 3 requests I found, no parameters were sent

Rapid account: Ianmckintosh 1969
ianmckintosh1969 Commented il y a 8 mois

Appreciate the quick response. I made an adjustment but 422 still occurs. Can you take a look to see if the information is still being passed incorrectly?

Rapid account: Api Ocean
ApiOcean Commented il y a 8 mois

It looks like the problem is in the parameters you are sending.
It should be like this:
{
“start_point”:"(1234,-1234)"
“end_point_1”:"(2345,-2345)"
“unit”:“miles”
}

And from you it comes like this:
{
“start_point=(1234%2C1234)&end_point_1=(2345%2C2345)&end_point_2=(3456%2C3456)&unit=miles&decimal_places=2)”:true
}

Join in the discussion - add comment below:

Login / Signup to post new comments