handle no data from api

https://appirio.my.salesforce.com/a3v50000000I5r1AAC

Also change the ajax layer to use wp functions