Add functional /pins/set/:num/:state API service