Refactor API conversion types