Is there a notion of “localization morphism” of schemes?

Let $ A$ be a ring and $ S\subseteq A$ a multiplicative system. Then the localization homomorphism of rings $ \phi:A\to S^{-1}A$ induces a morphism between the spectra: $ f=\mathrm{Spec}(\phi):\mathrm{Spec}(S^{-1}A)\to\mathrm{Spec}(A)$ .

Is there a property of scheme morphisms $ f:X\to Y$ that captures the idea that $ f$ locally looks like the Spec of a localization homomorphism of rings?

Notice that $ S$ doesn’t have to be of the form $ \{f^n\}_{n\geq 0}$ for $ f\in A$ or $ A\smallsetminus \mathfrak{p}$ for a prime ideal $ \mathfrak{p}\subset A$ .


Here’s an attempt. $ f:X\to Y$ is a localization morphism if there is an affine open cover $ \{V_i\}$ of $ Y$ such that every $ f^{-1}(V_i)$ has an affine open cover $ \{U_i\}$ such that the morphism $ f:U_i \to V_i$ corresponds to a homomorphism $ \phi=f^{\sharp}:A\to B$ , where $ A=\mathcal{O}_Y(V_i)$ and $ B=\mathcal{O}_X(U_i)$ , and there is a multuplicative system $ S\subseteq A$ and an isomorphism $ \alpha:B\tilde{\to} S^{-1}A$ such that $ \alpha\circ\phi=\lambda$ , where $ \lambda:A\to S^{-1}A$ is the canonical map to the localization.