It's clear to me that car parts are cheaper when purchased online rather than through the mechanic. I've been buying tires and brake pads online for years with few problems.
Now the wheel bearings on my 2009 Toyota Prius need replaced. I want to buy the replacements online and have the local Toyota dealership install them. I already checked with them to see if they would, and they will.
I want to make sure I'm getting the right parts. Buying tires and brakepads are easy, but how can I ensure that I'm getting the right parts to fit my car? I'm not looking for a subjective answer like the best brand or the best wheel bearing alloys; all I want to know is: how I can be sure the parts are compatible?
Should I read the owners manual? Should I check what's already on my car? Is there some database I should use?
Please answer my specific question as well as provide general guidance for buying compatible parts for cars.