add ajax call to API