1

We use Mapquest's directions API in order to obtain optimized routes. It has been found today, although this may have been going on longer, that our application to obtain these optimized routes no longer works. Our GET requests have been working for years, and nothing has changed in the way they are formatted. And yet the Mapquest API is returning the following error message whenever we send a GET request:

Illegal argument from request: Error parsing JSON provided by HTTP Request.

Here is an example of a standard GET request that we are sending:

https://www.mapquestapi.com/directions/v2/optimizedroute?key=KEY&json={locations:[{latLng:{lat:39.739236,lng:-104.990251}},{latLng:{lat:29.229902,lng:-96.273558}},{latLng:{lat:44.976497,lng:-93.253857}}],options:{doReverseGeocode:false,narrativeType:none}}

Notice how we are using latitude and longitude points, not addresses. We are having a hard time confirming that this is the correct formatting, because Mapquest's documentation seemingly doesn't mention it, but this formatting was devised in some way, and again, it has been working for years.

Our API key is working, because we can plug it into Mapquest's example GET request from their documentation and the request works:

https://www.mapquestapi.com/directions/v2/optimizedroute?key=KEY&json={"locations":["Denver,CO","Westminster,CO","Boulder,CO"]}

We tried various formats using double quotes as tests, and while some formats produced results, the route order was absolutely not correct. Our guess is that adding the quotes allowed the request to be processed, but the latitudes and longitudes were not interpreted as latitudes and longitudes. Can someone shed some light on what is happening? Thanks in advance.

  • Sorry for the inconvenience. We hope to have a fix for this soon. – MQBrian Sep 27 '22 at 20:45
  • Checking back in - this was resolved a couple of weeks ago and improved again a few days ago. There should not be any current problems. – MQBrian Nov 01 '22 at 15:33

0 Answers0