use getRtnCode everywhere in api rather than hardcoding the rtnCode