HELP! geocode service Error 400 when using geocodeaddresses

2301
9
03-30-2020 08:52 AM
CarlGordon1
New Contributor

Here's the error:

{  "error": {   "code": 400,   "message": "Unable to complete operation.",   "details": [       ]  } }

I get this error only when using GeocodeAddresses. FindAddressCandidates and Suggest work just fine.

This is a geocode service (Single House with subaddress) on Enterprise 10.6, shared "publicly". The service works fine in Map and Pro...

Any help would be appreciated!

0 Kudos
9 Replies
JoeBorgione
MVP Emeritus

A few more detail perhaps?  My guess is you are performing a geocode addresses in a stand alone python script?

That should just about do it....
0 Kudos
CarlGordon1
New Contributor

Hey Joe,

The service is to be consumed through a custom application to validate addresses for law enforcement. If the user enters an address and a 100% match exists, that gets passed automatically into the database. Otherwise, the user is presented with a list of valid possibilities. The FindAddressCandidates operation of the rest endpoint functions perfectly. The geocodeAddresses operation of the endpoint is returning the error above. At this point the service is not consumed in any application or script. We are just testing the various operations of the service.

JoeBorgione
MVP Emeritus

I see: hence the jason brackets.  If it any consolation I'm getting the same error on ours:

{
 "error": {
  "code": 400,
  "message": "Unable to complete operation.",
  "details": [
   
  ]
 }
}

Must be the way we are entering in the address(es).  I'll contact our sys admin guy; everything takes longer since we are all working at home; gimme a few and I'll let you know what he suggests...

That should just about do it....
0 Kudos
CFMGIS
by
New Contributor

Thanks! Everything I've been able to track down indicates it has to do with the syntax. I'm thinking it may be a bug...

We have the same issue going on with the work from home situation so I completely understand. Thanks for your help. 

0 Kudos
JoeBorgione
MVP Emeritus

We aren't coming up with much either.  This might shed some light:  geocodeAddresses—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers 

Are the addresses coming is as a list or just one at a time?  If the latter, won't  find address work just as well?

That should just about do it....
0 Kudos
JoeBorgione
MVP Emeritus

My colleague suggests something along these lines:

{
"records": [
{
"attributes": {
"OBJECTID": 1,
"Address": "380 New York St",
"Neighborhood": "",
"City": "Redlands",
"Subregion": "",
"Region": "CA"
}
},
{
"attributes": {
"OBJECTID": 2,
"Address": "1 World Way",
"Neighborhood": "",
"City": "Los Angeles",
"Subregion": "",
"Region": "CA"
}
}
]
}
That should just about do it....
0 Kudos
CFMGIS
by
New Contributor

Thanks. I've shown that to the developer but he insists on having the geocodeAddresses work as well. The dev lacks experience and understanding with GIS. Right now we're just passing a single address so I've instructed him to use the FindCandidateAddresses operation but have met resistance. Since you seem to be getting the same results with your service, I'll just write it off as a bug so he can move past it. Like I said, it works fine through ArcMap and Pro. I appreciate you taking the time to help out.

Thanks

Carl

0 Kudos
JoeBorgione
MVP Emeritus

I don't think it' a bug, I really think it needs a very specific syntax.  I'm nothing of a json guy so that stuff is pretty much greek to me...

That should just about do it....
0 Kudos
ShariF
by
Regular Contributor

Hello. Did you ever get this to work? Our law enforcement team is also running into an issue attempting to pass addresses into the REST services api with geocodeAddresses. The findCadidateAddresses is working. 

0 Kudos