When integrating with REST Web Services, it's often unnecessary—and inefficient—to retrieve entire records, especially if you only need a few key fields. Full record retrieval can introduce overhead and impact performance by returning more data than your integration actually requires.
Use Case: Fetching Customer Data
Imagine you’re building an integration that only needs the following information from a Customer record:
- Entity ID
- Company Name
- Status
Instead of pulling the full Customer record, which includes numerous additional fields and nested data, you can streamline your request using the fields query parameter.
To request only the specific fields you need, use the following format:
GET https://{NSACCOUNT}.suitetalk.api.netsuite.com/services/rest/record/v1/customer/{ID}?fields=entityId,companyName,entityStatus
This call returns a response containing just the entityId, companyName, and entityStatus fields—making your integration more efficient and easier to manage.
To know more about REST Web services Operations, check these New to NetSuite Articles.
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect, or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
How are you using REST Web Services in your business? Feel free to share them here!