It doesn't matter what position or salary you applied for--your employer is not obligated to hire you in the first place and, if they choose to hire you, is allowed to hire you for the position and at the salary they deem appropriate. The only exception would be if you had an actual employment contract guarantying you a certain position or salary; however, in the absence of a contract, this is legal.