We present two-dimensional (2D) radiative transfer modelling of the Eta Carinae binary system accounting for the presence of a wind–wind collision (WWC) cavity carved in the optically thick wind of the primary star. By comparing synthetic line profiles with spectra obtained with the Hubble Space Telescope/Space Telescope Imaging Spectrograph near apastron, we show that the WWC cavity has a strong influence on multi-wavelength diagnostics. This influence is regulated by the modification of the optical depth in the continuum and spectral lines. We find that Hα, Hβ and Fe ii lines are the most affected by the WWC cavity, since they form over a large volume of the stellar wind of the primary. These spectral lines depend on latitude and azimuth since, according to the orientation of the cavity, different velocity regions of a spectral line are affected. For 2D models with orientation corresponding to orbital inclination angle and longitude of periastron , the blueshifted and zero-velocity regions of the line profiles are the most affected by the cavity. These orbital orientations are required to simultaneously fit the ultraviolet (UV) and optical spectrum of Eta Car around apastron, for a half-opening angle of the cavity in the range of 50°–70°. We find that the excess P Cygni absorption seen in Hα, Hβ and optical Fe ii lines in 1D spherical models becomes much weaker or absent in the 2D cavity models, in agreement with the observations. The observed UV spectrum of Eta Car is strongly dominated by absorption of Fe ii lines that are superbly reproduced by our 2D models when the presence of the low-density WWC cavity is taken into account. Small discrepancies still remain, as the P Cygni absorption of Hγ and Hδ is overestimated by our 2D models at apastron. We suggest that photoionization of the wind of the primary by the hot companion star is responsible for the weak absorption seen in these lines. Our cmfgen models indicate that the primary star has a mass-loss rate of 8.5 × 10−4 M⊙ yr−1 and wind terminal velocity of 420 km s−1 around the 2000–2001 apastron.