Request
A request to the SuiteRest API is made by passing the URL along with the script and deploy parameters, which define the endpoint.
URL Format
To properly format the URL, you will need the account ID of the NetSuite account you are targeting. You will also need to include the script and deploy parameters. These parameters are unique to each endpoint and will be provided accordingly. You will find the script and deploy parameters in the documentation for each endpoint.
| Parameter | Description |
|---|---|
| accountid | The account ID of the Netsuite account |
| scriptid | The script parameter unique to each endpoint |
| deploymentid | The deploy parameter unique to each endpoint |
URL Template
https://{{accountid}}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script={{scriptid}}&deploy={{deploymentid}}
URL Sample
https://123456.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_prac_api_categories&deploy=customdeploy_prac_api_categories_v1
URL Parameters
Most parameters will be in the format that accepts a single value. Where indicated a parameter may accept and array of values. Futher, some parameters accept an "exclusion" (not) of a value or an array of values.
| Type | Notes |
|---|---|
| Single | Most parameters take a single value. |
| Array | To use an array, pass a comma-limited list of values with the parameter. For example: &custparam_cat=3,6,7. |
| Not | When available, you may use an exclamation point (!) to indicate an exclusion. For example, to get all projects that are not in a completed status (id: 14) you would use &custparam_status=!14 in your projects request. To exclude a list, simple use and exclamation point (!) in front of your list of values. For example, using &custparam_cat=!3,6,7 in a projects query would return all projects that are not in category 3, 6, or 7. |
HTTP Methods Used
Here is a table with each of the HTTP methods used by the services. The documentation for each endpoint will indicate with methods are available for the endpoint.
| Method | Description |
|---|---|
| GET | Used for retrieving a record or records from the server |
| POST | Used for updating records on the server |
| PUT | Used for creating records on the server |
| DELETE | Deletes data from the server |