Use ApiSerializable interface instead of method checking
Add some function docs