Starting from the microscopic light-matter interaction in form of the minimal coupling Hamiltonian, the multipole approximation for the optical response of localized electrons in atomic systems is extended to delocalized electrons in solids. A spatial averaging procedure is used to derive the electromagnetic sources for macroscopic Maxwell's equations as well as the corresponding many particle Hamiltonian on a coarse grained length scale. The results are illustrated for semiconductor bulk material up to quadrupole moments for the interband transitions, where gauge invariant equations of motion for the optical response are obtained.