Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does netsuite have REST ful API? [closed]

Tags:

netsuite

I want to know does Netsuite provides REST ful api? Currently i am doing integration with my application(java) with soap based web services.i have done some research but didn't get useful information.IF it does where can i found api?

like image 568
RvN Avatar asked Oct 06 '14 10:10

RvN


People also ask

What API does NetSuite use?

There are two types of NetSuite API; SuiteScript and SuiteTalk. NetSuite SuiteScript allows users to host and build applications in NetSuite. There are many NetSuite Script types provided by the NetSuite API.

Is RESTful API outdated?

In short, all panelists agree that REST is still a relevant and useful style. One reason is that REST was designed to last. “If you are building an API product that will be consumed by clients you have no control of, it should scale indefinitely and last for decades,” said Z.

Are all API RESTful?

Not all HTTP APIs are REST APIs. The API needs to meet the following architectural requirements to be considered a REST API: Client-server: REST applications have a server that manages application data and state. The server communicates with a client that handles the user interactions.


1 Answers

Avoid the SuiteTalk SOAP web services API like the plague; it will do nothing but waste your time to. Usage of Netsuite SOAP API is viable only when you are okay with the SOAP API being non performant, don't mind interacting with gross buggy SOAP API, have much time to implement robust error handling to account for the random SOAP errors, concurrency errors. You'll need much time to develop robust fault tolerance. All that time will be wasted time; because no amount of time will make the SOAP API performance acceptable.

RESTlet's are preferred over SOAP API usage for writing data; RESTlets tend to be slightly more performant for writes (although responses are still extremely slow and not suitable for a customer facing app).

RESTlet's are a viable short term solution for writing data to Netsuite. Its essentially a JS script that allows you to set up a token based auth poor man's JSON endpoint; in which you can send JSON request bodies and get back JSON response bodies. Usage is reasonable in cases in which not much data needs to be written via the Restlet's (for instance for SalesOrders). A queue based system and background jobs with retry capabilities will mitigate the random Netsuite error issues (concurrency errors, timeouts etc).

If you must write to a bunch of Netsuite entities frequently and are using Netsuite as the source of truth for your data rather than attempting to build an entire REST like JSON API on top of Netsuite; I'd recommend implementing a pub/sub service in which Netsuite publishes events to an external service subscribed to by your app/API. Your app could also publish mutations to a channel subscribed to by Netsuite. This way data mutations sent to Netsuite can occur in a middle layer with reduced complexity.

To fetch Netsuite data for outside apps the most efficient means available appears to be the Netsuite ODBC database driver; it provides a direct connection to Netsuite database read only table views. Simple select queries for a set of Items that with same schema in Postgres or MySQL typically take 0.5 ms or less; typically take between 15 seconds to slightly over 100 seconds to return.

Connection timeouts and other errors from Netsuite are still common using NS ODBC driver. Despite slow query results retrieval of all data needed for a set of 5000 items in 14 seconds is far better than the hours it would take to get the same via Netsuite's SOAP API.

like image 156
alex1sz Avatar answered Sep 21 '22 23:09

alex1sz