Containers for a foodstuff or beverage preparation machine that includes beverage or foodstuff preparation material and a code encoding preparation information are disclosed. Beverage or foodstuff preparation machines and systems that can be utilized with the container are also disclosed. Methods of producing and using the containers, machines, and systems are also disclosed.