FileSync REST API
Overview
The FileSync REST API provides a programmatic interface for interacting with the FileSync bundle in NetSuite. This API is designed to mirror the functionality of our SuiteScript API, allowing external applications to perform file operations within NetSuite.
Authentication
The FileSync REST API uses NetSuite's Token-Based Authentication (TBA) for secure access. To use the API, you'll need to:
- Set up an integration record in NetSuite
- Generate authentication tokens (consumer key, consumer secret, token ID, and token secret)
- Include these tokens in your API requests
For detailed instructions on setting up Token-Based Authentication, please refer to the Setting up Token-based Authentication for a RESTlet integration.
Available Endpoints
The FileSync REST API provides the following endpoints:
GET /getRecordFolderContents
- Retrieve contents of a record's folderGET /getFolderContentsById
- Get folder contents by folder IDGET /getFolderContentsByPath
- Get folder contents by pathGET /getFileContentById
- Retrieve file content by file IDGET /getFileContentByPath
- Retrieve file content by pathGET /getConfigList
- Get list of available configurationsPOST /offloadFileById
- Offload a file by IDPOST /uploadFile
- Upload a new filePOST /renderAndUploadDocument
- Render and upload a documentPOST /createFolderByPath
- Create a new folder by path
For detailed information about each endpoint, including request/response formats and examples, please refer to the FileSync REST API Endpoints documentation.
Connections & Configurations
Before using the FileSync REST API, you'll need to configure the appropriate connections and settings in your NetSuite environment. This includes:
- Setting up the FileSync bundle
- Configuring record type mappings
- Establishing folder structures
- Setting up appropriate permissions
For detailed configuration instructions, please refer to the FileSync Configuration Guide.
Record Type Configuration IDs
Many API endpoints require a Record Type Configuration ID to specify which record type you're working with. These IDs are created during the configuration process and can be retrieved using the getConfigList
endpoint.
When making API calls that require a Record Type Configuration ID, ensure you're using the correct ID that corresponds to your desired record type and configuration.