Refactor API to accept latitude and longitude as strings or float numbers