It is shown that the Baer–Kaplansky Theorem can be extended to all abelian groups provided that the rings of endomorphisms of groups are replaced by trusses of endomorphisms of corresponding heaps. That is, every abelian group is determined up to isomorphism by its endomorphism truss and every isomorphism between two endomorphism trusses associated to some abelian groups [Formula: see text] and [Formula: see text] is induced by an isomorphism between [Formula: see text] and [Formula: see text] and an element from [Formula: see text]. This correspondence is then extended to all modules over a ring by considering heaps of modules. It is proved that the truss of endomorphisms of a heap associated to a module [Formula: see text] determines [Formula: see text] as a module over its endomorphism ring.