jQuery ajax empty exeption on wordpress

As I said in the comments. The problem was on api side.

Error: (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

How to solve: Add this to .htaccess of api

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin: myUrl
</IfModule>

tech