Error calling MailChimp API

I usually use a PHP wrapper for MailChimp API calls, but I’m working in Shopify so no PHP.

I have a working POST in Postman. I took the jQuery AJAX code and added it to my test page.

When I load the page, I get:

  Failed to load Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access. The response had HTTP status code 401.

How can I get it working?