The invalid reason code is the value that the system assigns to a selected invalid reason for the purposes of document export so that a downstream workflow or SIS can act upon that code and behave accordingly.
The code against each invalid reason can be set in the Invalid Reason Display Text page in SCM.