My ex employer pays an annual salary. I quit in July and according to the terms of the bonus I am excluded from payout eligibility because I was not working there on Dec 31 of the bonus year. Is this legal? Is there any way to get them to pay me my bonus for the first half of the year?
It sounds like you had a contract with your employer. And it sounds like one of the terms of the contract was that if you were working there on December 31, you would have a bonus awarded to you. Since you are presumably not going to be working there on December 31, you will not be eligible for the bonus under the terms of the contract.
There is nothing illegal about making such a contract. If you had a problem with the bonus situation, you could have attempted to negotiate it when you accepted the job, just as you could have attempted to negotiate your salary or other benefits.
I would contact bureau of labor and industries. There are a lot of employers who aren't paying even minimum wage, though there are some exceptions. An annual salary sounds very unusual. I'd understand a monthly base with a year end bonus. But if you're really only paid once per year, I'd take a serious look at whether there are wage and hour violations here. And, if there are, there are penalties and attorney fees that could apply.