It seems the DMG has explicitly answered this question...
“…most magic items are so rare that they aren’t available for purchase. Common items, such as a potion of healing, can be procured from an alchemist, herbalist, or spellcaster. Doing so is rarely as simple as walking into a shop and...