Refactor API calls for new backend changes