Discussions
Consume external (internal) JSON from Items Search API with suitelet? Using nlapiRequestURL?
I’ve been trying to set up an XML product feed for affiliates to use to pull a feed of products on the website. Fortunately, a helpful gent from NetSuite showed me the Items Search API that should give me almost the exact data that I need, which returns JSON, but I’m struggling with how to pull that data via a Suitelet.
Normally, I would use something like an XMLHttpRequest, but it doesn’t look like that’s something that’s supported in SuiteScript. I’ve looked into nlapiRequestURL a little bit and it looks like that might do what I need, however, I’m having trouble implementing it in a way that makes sense. I’ve put it in a suitelet with the goal of being able to have the affiliates just be able to hit a URL and see/pull the XML document. I put together a quick test script, but I keep getting the HTTP response code 406, which appears to mean that the content