BagID

Backpack, equipped bags, bank and its equipped bags, reagent bank and, most likely, any future containers all internally is just a "bag" that have a bagID and can be used with any function operating with bags (like GetContainerItemLink(bagID, slotID), PickupContainerItem(bagID, slotID)). They can be accessed directly with their numeric values, but it is better to always use named constants defined in FrameXML\Constants.lua to make future WoW updates less likely to break your code.

Current possibilities for bagID are: