debugging the json ajax to the new api