Added check for APICode