1. SOAP vs REST :
1.1 NetSuite SOAP API’s Advantage:
Despite its age and being less modern compared to REST APIs, NetSuite SOAP API is more reliable for certain operations, especially for writing data into NetSuite. This contrasts with the common belief that modern REST APIs are always superior.
1.2 Comprehensive Access with SOAP:
The Netsuite SOAP API provides access to all fields in a request, unlike the REST API which may have limitations in accessing some record fields, thus showcasing better integration capability in some scenarios.
1.3 Most Important Handling Complex Data Transactions:
SOAP supports bulk creation or update requests, which can help manage API rate limiting by allowing operations on many records in a single request. Check here for detailed issues on limitations enforced.
1.4 Using the SOAP API:
custom records or fields can be integrated, which is crucial for businesses needing tailored integration solutions.
2. REST APIs use HATEOAS, which is an inefficient way to do the integration
It can slow things down because you often have to make several follow-up requests to get all the information you need.
What is HATEOAS?
As per Wikipedia, HATEOAS is a principle used in building RESTful web services. It makes applications work like web pages: each response from the server contains links to other actions available at that time. This means clients can dynamically navigate to different parts of the application without needing pre-programmed logic.
In other words, HATEOAS-based REST API doesn’t return all one meaningful JSON for the Sales order object, rather it returns just basic information and then gives you HyperLinks for more detailed information.
When you run a query, it only gives you the record IDs and links for further details (HATEOAS), not the full details of the records. You can only use the main parts of the records (body fields) for filtering in queries.
For example, if you query the NetSuiteREST API for a specific sales order, the API response would not only return the sales order details but also include hyperlinks to related actions that can be performed on that sales order. These actions might include updating the sales order, deleting it, or viewing related records like customer details or shipment tracking.