Let's assume the bottle is completely full (i.e. it acts as a rigid body and essentially ignores air resistance), and that it is initially held horizontally, by the cap, and thrown straight upward. Then you'll need four things:
- The initial height $h$ above the landing surface, 
- The distance $d$ between the bottom of the bottle and its center of mass, 
- The initial vertical velocity $v_0$, and 
- The initial angular velocity $\omega$ about the bottle's center of mass. 
Since air resistance is ignored, there is no torque on the bottle while in the air; as such, it rotates with constant angular velocity $\omega$ the whole time. Requiring that the bottle lands upright is equivalent to saying that the total angle rotated in flight is equivalent to $3\pi/2$ (since the bottle, when flipped, rotates in a manner such that the cap is the first end to face the ground). This constraint is equivalent to:
$$\omega t=2\pi(n+3/4)$$
for flight time $t$ and some integer $n\geq0$. Now, since the bottle is a rigid body, gravity acts as if it were a point mass. As such, the flight time can be calculated from the normal kinematic formula:
$$h+v_0 t-\frac{1}{2}gt^2=d$$
taking the height of the landing surface itself to be 0. Using the quadratic formula,
$$t=-\frac{v_0\pm\sqrt{v_0^2+2g(h-d)}}{g}$$
Since we require a positive time, we must choose the minus sign in the $\pm$, making it
$$t=\frac{\sqrt{v_0^2+2g(h-d)}-v_0}{g}$$
Plugging this into our earlier constraint, we see that for a given $v_0$ and $h$,
$$\omega=\frac{2\pi g}{\sqrt{v_0^2+2g(h-d)}-v_0}(n+3/4)$$
so there are a multitude of possible angular velocities that will guarantee a landing. For the minimum angular velocity, set $n=0$.