A cartridge assembly for use with a drug delivery device, the cartridge assembly comprising: a cartridge holder (104, 300, 500, 650, 750, 850, 950) designed for being connected with a drug delivery mechanism; and a cartridge (120, 200, 400, 600, 700, 800, 900) comprising a proximal end and a distal end, and being fitted with a retention cap (210, 410, 610, 710, 810, 910); wherein a main body (220, 420, 902) of the cartridge (120, 200, 400, 600, 700, 800, 900) is positionally fixed with respect to axial movement or with respect to axial and rotational movement by means of mechanical interaction of the retention cap (210, 410, 610, 710, 810, 910) with the cartridge holder (104, 300, 500, 650, 750, 850, 950) when the cartridge (120, 200, 400, 600, 700, 800, 900) is in the assembled position and the cartridge (120, 200, 400, 600, 700, 800, 900) and the cartridge holder (104, 300, 500, 650, 750, 850, 950) are configured to be fixed to each other in a predetermined rotational position, characterized in that said retention cap (210, 410, 610, 710, 810, 910) being fitted to the distal end of the cartridge comprises at least one cartridge coding feature (214, 414, 612, 812, 712, 912) at a proximal end of the retention cap (210, 410, 610, 710, 810, 910), the at least one cartridge coding feature being configured to affix said cartridge (120, 200, 400, 600, 700, 800, 900) to said cartridge holder (104, 300, 500, 650, 750, 850, 950) in the predetermined rotational position by the mating of said cartridge coding feature (214, 414, 612, 712, 912) with a corresponding coding feature (310, 512, 660, 670, 762, 860, 960) on said cartridge holder (104, 300, 500, 650, 750, 850, 950), wherein the rotational position is chosen out of one or two possible predetermined rotational positions. a cartridge holder (104, 300, 500, 650, 750, 850, 950) designed for being connected with a drug delivery mechanism; and a cartridge (120, 200, 400, 600, 700, 800, 900) comprising a proximal end and a distal end, and being fitted with a retention cap (210, 410, 610, 710, 810, 910); wherein a main body (220, 420, 902) of the cartridge (120, 200, 400, 600, 700, 800, 900) is positionally fixed with respect to axial movement or with respect to axial and rotational movement by means of mechanical interaction of the retention cap (210, 410, 610, 710, 810, 910) with the cartridge holder (104, 300, 500, 650, 750, 850, 950) when the cartridge (120, 200, 400, 600, 700, 800, 900) is in the assembled position and the cartridge (120, 200, 400, 600, 700, 800, 900) and the cartridge holder (104, 300, 500, 650, 750, 850, 950) are configured to be fixed to each other in a predetermined rotational position, characterized in that said retention cap (210, 410, 610, 710, 810, 910) being fitted to the distal end of the cartridge comprises at least one cartridge coding feature (214, 414, 612, 812, 712, 912) at a proximal end of the retention cap (210, 410, 610, 710, 810, 910), the at least one cartridge coding feature being configured to affix said cartridge (120, 200, 400, 600, 700, 800, 900) to said cartridge holder (104, 300, 500, 650, 750, 850, 950) in the predetermined rotational position by the mating of said cartridge coding feature (214, 414, 612, 712, 912) with a corresponding coding feature (310, 512, 660, 670, 762, 860, 960) on said cartridge holder (104, 300, 500, 650, 750, 850, 950), wherein the rotational position is chosen out of one or two possible predetermined rotational positions.