You are correct state_id is not a field on the model, state is, and using “state” in the field lists works.
I would like to propose that if ‘state_id’ is a valid property on the queryset (and in the database) that is should be serialized.
It is my preference that a serialized JSON property (to be consumed in a strongly typed language) is reserved for a specific type. I realize Django will determine that `state: int` is an Int and it needs to do a FK lookup and populate that property with the state model but a strongly typed language does not have that ability to determine between two types nor does it have the ability to requery. So my preference when I consume JSON response into my apps is to reserve state: { title: str, etc...} to an object representing State model and use state_id: int wherever I just need the Integer.
While I understand that this is my personal preference I think it is reasonable to request that if QuerySet.state_id returns a valid value then it should also be capable of being serialized as well.