successfully implement Ajax post request via api