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:

  1. Set up an integration record in NetSuite
  2. Generate authentication tokens (consumer key, consumer secret, token ID, and token secret)
  3. 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 folder
  • GET /getFolderContentsById - Get folder contents by folder ID
  • GET /getFolderContentsByPath - Get folder contents by path
  • GET /getFileContentById - Retrieve file content by file ID
  • GET /getFileContentByPath - Retrieve file content by path
  • GET /getConfigList - Get list of available configurations
  • POST /offloadFileById - Offload a file by ID
  • POST /uploadFile - Upload a new file
  • POST /renderAndUploadDocument - Render and upload a document
  • POST /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:

  1. Setting up the FileSync bundle
  2. Configuring record type mappings
  3. Establishing folder structures
  4. 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.


Was this article helpful?