All three model codes and the new International Building Code and One and two family dwelling code all provide for right to appeal a decision of the code official.
Read about your rights to appeal at:
BOCA National Building Code in Sec 121
SBCCI Standard Building Code in Sec 108
ICBO/IFCI Uniform Building Code in Sec 105
ICC International Building Code in Sec 112
ICC One and Two Family Dwelling Code in Sec 107
You can get information regarding how to file these appeals from your local building jurisdiction in which you are contesting the decision.