Response refactor and json api working