Implementation of /pref endpoint