What's hampering your ability to debug problems like this is code like this:
DO NOT COMBINE STATEMENTS LIKE THAT! You cannot see what when parse and stringify methods are generating. Put those results in variables so you can inspect the values before using them in the enclosing methods.
var parsedResponse = JSON.parse(request.response);
If your code is getting back a non-json response, like nothing at all or an error page, your code will still try to parse that as json and you'll get errors like you're seeing.
If you're not getting the response you expected, it's probably because you're not sending the data expected to the API method or not sending it in format the API method is expecting. If that's the case, you'll have to contact the vendor of the API for help on it.