Global API
Requests

Upload File

2min

When using the Upload File request, use requestJSON to pass the required file details. The response will have responseJSON, which stores the file response returned by NetSuite. This action will upload the file into the given file cabinet's folder.

Note: NetSuite has a 500k limitation for uploaded files. However, this can be overcome by using contentURL. This passes a URL link to the file, rather than the file itself.

The File object has the following parameters

Field Name

Data Type

Description

caption

string

Pass the file name

content

Blob

Pass the blob content in the base64Encode format

contentURL

string

Public URL of the content

folder

LookupRecord

Internal Id of the Folder

name

string

Provide the file name with the extension like Test.pdf



The following is an example of uploading the Opportunity's attachment as a file to NetSuite.

Request
Response


The following is an example of uploading a URL as a file to NetSuite.

Request
Response