created api endpoint for getting locations