andyworkbase
andyworkbase

Reputation: 41

REST API Magneto: difference between product id and item id

According to documentation REST API: Stock Items HTTP Method: PUT /stockitems has options product_id and item_id. I'm interested which is the difference between them?

Upvotes: 4

Views: 960

Answers (1)

Douglas Radburn
Douglas Radburn

Reputation: 808

Looking at the database table cataloginventory_stock_item it appears that item_id is the primary key on the table, and is set to AUTO_INCREMENT. In a standard setup, this is likely to match the product_id for the most part, however, I believe this is in place incase you have multiple stock_ids for the same product. stock_id relates to the table cataloginventory_stock

Upvotes: 2

Related Questions