NetSuite API SOAP/Rest

Hi all,

I have a saved search setup in Oracle NetSuite that I would like to call and pull the data from into KNIME.

I have a NetSuite token/ID. I don’t know whether I have to do this via REST or SOAP. I do know that under the Manage Integrations screen that the “rest” box is unchecked, and I’m unable to check. I have the tokens nonetheless.

I read a lot of documentation on the NetSuite side, other web sources/guides, and here, but I am still confused.

I have played with other basic API’s before and pulled data from public statistical sources, but this one is throwing me sideways.

Any guidance would be appreciated!

Hi @wisemanleo , I think this is more a question for Oracle NetSuite than Knime, so you will get an answer only if someone in the forum has had experience with this specific process.

You may need to search what is the api call to do this, and then we can help you implementing it in Knime.

EDIT: I did a quick search on Google, and it looks like you can do this via a POST Request with a JSON payload, so it’s basically RESTful, no SOAP.

You will need to include “CONSUMER KEY / CLIENT ID” and “CONSUMER SECRET / CLIENT SECRET” in your headers, so you need to have these information in order to be able to do the api call.

Hi @wisemanleo , it looks like it accepts both SOAP and REST api calls, but for this specific action, not sure if SOAP is supported, but REST is, in this case RESTlet to be more precise.

And there are 2 types of NetSuite APIs: SuiteScript and SuiteTalk.

This seems to be doable via the SuiteScript, but you need to implement some custom code to make this work. This is done on the NetSuite side.

Thanks @bruno29a. Implementing code on the NetSuite side was what confused me.

I have found code that you might be referring to here which I’ll try using as is:

Based on the tokens I have, mind if I ask which node is best to execute this?

Hi @wisemanleo , yes this guy has a very good instructions. He also has instructions for saved search:

Based on what he’s doing, you can use the POST Request node.

In the body, you can pass your search id:

  "searchID": "your_search_id"

And as he has it, you need to pass these in your headers:
Content-Type: application/json
Authorization: OAuth oauth_consumer_key="", oauth_nonce="", oauth_signature="", oauth_signature_method=“HMAC-SHA256”, oauth_timestamp="", oauth_token="", oauth_version=“1.0”, realm=TSTDRV2355109’

1 Like

Sorry for the late response here. Been trying to trouble shoot and get this to work, but can’t get around a 405 on the result (which I understand means “method not allowed”).

For the body I used:
curl -X “POST” “”
-H ‘Authorization: OAuth oauth_consumer_key=“YOUR-CONSUMER-KEY”, oauth_nonce=“YOUR-NONCE”, oauth_signature=“1bb31e23-4e97-40ba-8ef7-1ca20101fdfb”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“YOUR-TIMESTAMP”, oauth_token=“YOUR-TOKEN”, oauth_version=“1.0”, realm=YOUR-NS-ACCOUNT-ID
-H ‘Prefer: transient’
-H ‘Content-Type: text/plain; charset=utf-8’
-d $’{
“searchID”: “customsearch12345”

I didn’t know what “nonce” or the timestamp should be, so I just put in random values here.

I didn’t use the “Request Headers” tab of the POST Request node - just dumped everything into the “Request Body” box.

The token I used was the Token ID, though from NetSuite I have both a Token ID and a Token Secret.

I will keep trying but thought I’d give an update in case there was anything immediately obvious that I’m doing incorrectly.

Made some progress and at least got to a “401” which is an invalid login error, as opposed to “405” which represented invalid method.

Inched a few steps forward - what was missing was Palladian’s OAuth node. I have that extension now installed and running, but having trouble getting it to work. I ran a successful Postman test using the same information, so now it’s truly about KNIME and getting the nodes configured correctly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.