Generic api call for locations