REST API and back-end logic for LocTag location based service