A container for use with a beverage or foodstuff preparation machine, the container comprising: a storage portion for containing a precursor material; a code storing preparation information used by said machine to process the precursor material, the code readable by a code reading system of the machine, which comprises: a lighting system to project an emission to the code, and; a camera system for obtaining a digital image of the code, the code arranged to overlap the precursor material, and; a support layer to support the code, the support layer at least partially light transparent to the emission from the lighting system, wherein the code comprises reflector layer, which is configured to reflect the emission before it is transmitted to a support layer, and the precursor material is arranged to absorb the emission.