---
title: Netsuite Source Testing API (Netsuite API Replica)
date: 2025-12-10T06:26:14Z
modified: 2026-06-15T06:59:40Z
permalink: "https://ezintegrations.ai/docs/how-to-fetch-netsuite-data/"
type: docs
status: publish
excerpt: ""
wpid: 3774
doc_category:
  - AI Workflow Testing APIs
author: Automation Hub
---

The NetSuite Source Testing API enables users to validate data extraction from NetSuite using
**OAuth 1.0 signature-based authentication**. The API executes
**SuiteQL queries** and supports **offset-based pagination**, allowing
controlled and reliable retrieval of NetSuite datasets.

This API is intended for **testing and validation purposes** when configuring
NetSuite as a source system in eZintegrations.

---

## Overview

The NetSuite Source Testing API is a replica endpoint provided by eZintegrations to demonstrate
secure connectivity and data access from NetSuite using OAuth 1.0 authentication.

### When to Use This API

This API is typically used when configuring NetSuite as a source system in eZintegrations to:

- Validate OAuth 1.0 credentials and signature generation
- Test SuiteQL query execution and verify expected results
- Validate offset-based pagination behavior during data extraction
- Troubleshoot authentication, connectivity, or data retrieval issues before production deployment

---

## API Details

### Method

**GET**

### Endpoint

{{base_url}}/partner/services/rest/query/v1/suiteql?
This endpoint executes SuiteQL queries against NetSuite and returns results in a paginated format.

---

## Authentication

### Authentication Type

OAuth 1.0 (Signature-Based Authentication)

The NetSuite Source Testing API requires OAuth 1.0 authentication using the
**HMAC-SHA256** signature method. Each request must include a valid OAuth signature
in the `Authorization` header.

### Authorization Header

{
  "Authorization": "{%signature%}"
}
---

## OAuth Signature Generation

### Pre-request Script (OAuth 1.0 Signature Generation)

The OAuth signature is generated dynamically using standard OAuth 1.0 parameters and request
details. This script must be placed in the **Pre-request Script** section of the
NetSuite source configuration in eZintegrations.

import datetime
import random
import string
import hashlib
import base64
import hmac
import urllib.parse

request_method = 'POST'
url = 'https://{{base_url}}/partner/services/rest/query/v1/suiteql'
oauth_consumer_id = '15071997_BIZ01'
oauth_consumer_key = '{{client_id}}'
oauth_consumer_secret = '{{client_secret}}'
oauth_token = 'SrHIlXtmxaPjsmudRK6T4LgSSOYMMnnH'
oauth_token_secret = 'YYQ2EnGPi7dDcDDk3USJChJnSKyXKQno'
oauth_signature_method = 'HMAC-SHA256'
oauth_timestamp = str(int(datetime.datetime.now().timestamp()))
oauth_nonce = ''.join(random.choices(string.ascii_letters + string.digits, k=11))
oauth_version = '1.0'
normalized_request_method = request_method.replace(' ', '') 
normalized_string_url = urllib.parse.quote(url, safe = '') 
normalized_params = {'oauth_consumer_key': oauth_consumer_key,'oauth_token': oauth_token,'oauth_signature_method': oauth_signature_method,'oauth_timestamp': oauth_timestamp,'oauth_nonce': oauth_nonce,'oauth_version': oauth_version,'limit':max_num,'offset':min_num} 
sorted_params = dict(sorted(normalized_params.items())) 
normalized_string_parmas = [k+'='+v for k,v in sorted_params.items()] 
normalized_string_parmas = '&'.join([str(elem) for elem in normalized_string_parmas]) 
normalized_string_parmas.replace(' ','') 
normalized_string_parmas = urllib.parse.quote(normalized_string_parmas, safe = '') 
base_string = request_method + '&' + normalized_string_url + '&' + normalized_string_parmas 
base_string = str.encode(base_string) 
signature_key = oauth_consumer_secret + '&' + oauth_token_secret 
signature_key = str.encode(signature_key) 
oauth_signature = hmac.new(signature_key, base_string, hashlib.sha256) 
oauth_signature.hexdigest() 
oauth_signature = base64.b64encode(oauth_signature.digest()) 
oauth_signature = oauth_signature.decode('UTF-8') 
oauth_signature = urllib.parse.quote(oauth_signature, safe = '') 
signature ='OAuth realm="'f'{oauth_consumer_id}",oauth_consumer_key="'f'{oauth_consumer_key}",oauth_token="'f'{oauth_token}",oauth_signature_method="'f'{oauth_signature_method}",oauth_timestamp="'f'{oauth_timestamp}",oauth_nonce="'f'{oauth_nonce}",oauth_version="'f'{oauth_version}",oauth_signature="'f'{oauth_signature}"'
---

## Pagination

### Pagination Type

Offset-Based Pagination

### Pagination Configuration

- **Data Collection Key:** `[‘items’]`
- **User Key:** `hasMore`
- **Key to Update:** `offset`

### Numeric Pagination Parameters



| Parameter | Value | Description |
| --- | --- | --- |
| Minimum Number | Starting offset |  |
| Maximum Number | 100 | Maximum records per request |

---

## Authentication Instructions:

- To acquire the Base URL and create your own Client ID and Secret, please refer to the My Profile section within your Bizdata account.

---

## How to Retrieve Data Using NetSuite in eZintegrations

1. Configure **NetSuite** as a **source system** within eZintegrations.
2. Provide the required OAuth 1.0 credentials during source configuration.
3. Paste the provided pre-request script into the **Pre-request Script** section.
4. Configure the SuiteQL query and pagination options.
5. Execute the integration to retrieve NetSuite data, with authentication and pagination managed internally by eZintegrations.

---

## Frequently Asked Questions

 ### 1. What is the purpose of the NetSuite Source Testing API?

 It is used to test OAuth authentication, SuiteQL query execution, and pagination while configuring NetSuite as a source in eZintegrations.

 

 

  ### 2. What authentication method does this API use?

 The API uses OAuth 1.0 with HMAC-SHA256 signature-based authentication.

 

 

  ### 3. Does this API support cursor-based pagination?

 No. The API supports offset-based pagination only.

 

 

  ### 4. Where is the data returned in the response?

 The data is returned inside the items array.

 

 

  ### 5. Where do I get the Base URL and OAuth credentials?

 They can be generated from the My Profile section in your eZintegrations account.

 

 

 ---

## Notes

- OAuth 1.0 authentication is mandatory
- SuiteQL is used to query NetSuite datasets
- Authentication and pagination are handled internally by eZintegrations
- This API is intended for testing and validation purposes only

## Topics

**Docs Categories:** [AI Workflow Testing APIs](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/ai-workflow-testing-apis.md)