Trying to go from search to market price, confused about productId vs. productconditionId vs. Sku

For example I do a search using API and get a productId of 124124, with this I am able to get product info, but can’t get market price as it returns none. I think it is because marketprices wants productconditionId , but I can’t find in docs how this is different from productid, and also docs also use term SKU but not sure how they relate to the other 2 terms. Any guidance?

I believe SKU and productconditionId are the same thing. I think TCGPlayer originally was using productconditionId in its first APIs, and then later changed to SKU. All of my code uses SKU, but I see a few chunks of old, commented-out code that mention productconditionId. I also have a vague recollection about being highly annoyed at some major change. I wrote all this code years ago though, so I apologize if my memory isn’t perfect.

Essentially each productid has a unique SKU/productconditionId for each possible condition of that productid.
So for example the productid of 124124 you mentioned has 4 unique SKU/productconditionIds:
3248150 = Near Mint
3248151 = Lightly Played
3248152 = Moderately Played
3248153 = Heavily Played

However, I believe Magic and Pokemon work differently. Magic returns prices at the ProductID level, but Pokemon returns pricing at the SKU level.

I hope this helps point you in the right direction!