Api for set location