We outline a general perturbative method of evaluating scattering features of finite-range complex potentials and use it to examine complex perturbations of a rectangular barrier potential. In optics, these correspond to modulated refractive index profiles of the form n(x) = n0 + f (x), where n0 is real, f (x) is complex-valued, and |f (x)| ≪ 1 ≤ n0. We give a comprehensive description of the phenomenon of unidirectional invisibility for such media, proving five general theorems on its realization in PT -symmetric and non-PT -symmetric material. In particular, we establish the impossibility of unidirectional invisibility for PT -symmetric samples whose refractive index has a constant real part and show how a simple scaling transformation of a unidirectionally invisible PT -symmetric index profile with n0 = 1 may be used to generate a hierarchy of unidirectionally invisible PT -symmetric index profiles with n0 > 1. The results pertaining unidirectional invisibility for n0 > 1 open up the way for the experimental studies of this phenomenon in a variety of active material. As an application of our general results, we show that a medium with n(x) = n0 + ζe iKx , ζ and K real, and |ζ| ≪ 1 can support unidirectional invisibility only for n0 = 1. We then construct unidirectionally invisible index profiles of the form n(x) = n0 + ℓ z ℓ e iK ℓ x , with z ℓ complex, K ℓ real, |z ℓ | ≪ 1, and n0 > 1.