return category object from rest api