  Enabled by x-ray free-electron lasers, nonlinear optical phenomena can be
explored in the x-ray domain nowadays. Among the multitude of newly accessible
processes, this theoretical study focuses parametric x-ray optical wavemixing
for closer investigation. Specifically, we develop a framework based on
non-relativistic QED to describe x-ray optical sum- and difference-frequency
generation as well as x-ray parametric down-conversion on equal footing. All of
these processes promise imaging capabilities similar to regular x-ray
diffraction with additional spectroscopic selectivity that is tunable via the
optical admixture. Based on our derivation, we identify the imaged quantity as
we relate the observable scattering pattern to an underlying response function
of the medium. The resulting relation, furthermore, enables the microscopic
reconstruction of this response function from nonlinear analogues of
crystallographic measurements. We benchmark our approach on recent experimental
sum-frequency results, for which we find encouraging agreement with our theory.
