NetSuite HTTP DELETE Parameters

NetSuite HTTP DELETE method uses specific URL and header parameters.

·2 min read·View Oracle Docs

The HTTP DELETE method in NetSuite's SuiteScript allows developers to send requests to remove resources at a specified URL. Understanding the necessary parameters is crucial for successful integration.

What are the Key Parameters for HTTP DELETE?

This method involves using a JavaScript object for the options parameter, focusing primarily on url and optionally on headers.

  • options.url: This is a required string that specifies the HTTP URL for the request. Ensure the URL is fully qualified. Misconfiguration here will lead to errors such as SSS_INVALID_URL or SSS_MISSING_REQD_ARGUMENT if left unspecified.

  • options.headers: This optional Object allows the inclusion of HTTP headers with the request. Consult the relevant section on HTTP Header Information for detailed implementation.

Error Handling and Timeouts

The method times out if it takes over 5 seconds to connect or more than 45 seconds to send the payload. Ensure domain names in URLs are correct to prevent SSS_INVALID_HOST_CERT errors.

Supported Script Types

The HTTP DELETE method works in both client and server scripts but does not function in unauthenticated client-side contexts.

Governance: Invoking this method consumes 10 governance units.

Note: This method has been available since version 2015.2 of NetSuite.

Code Sample

suitescript
1// Example setup for DELETE request
2var headerObj = {
3 name: 'Accept-Language',
4 value: 'en-us'
5};
6var response = http.delete({
7 url: 'http://www.mytestwebsite.com',
8 headers: headerObj
9});

Who This Affects

  • Integrations Specialists: For those handling web service integrations, understanding parameters is vital.
  • Developers: Client and server-side scripts can utilize this for resource management.

Key Takeaways

  • The url parameter is mandatory and critical for defining the request endpoint.
  • Use headers to customize your HTTP requests when necessary.
  • Govern the usage with its 10-unit cost and respect the timeout limitations.
  • Check domain configurations to avoid common certificate errors.

Frequently Asked Questions (4)

Can the HTTP DELETE method be used in unauthenticated client-side contexts within SuiteScript?
No, the HTTP DELETE method cannot be used in unauthenticated client-side contexts. For more details, refer to the SuiteAnswers article on Outbound HTTPS in an unauthenticated client-side context.
What happens if the 'options.url' parameter is not specified in a SuiteScript HTTP DELETE request?
If the 'options.url' parameter is not specified, the error code 'SSS_MISSING_REQD_ARGUMENT' will be thrown, indicating that a required argument is missing.
How do timeout settings affect HTTP DELETE requests in SuiteScript?
If the connection to the destination server exceeds 5 seconds, or if the request payload takes longer than 45 seconds to send, the request will timeout.
Are there any governance considerations when using the HTTP DELETE method in SuiteScript?
Yes, each HTTP DELETE request consumes 10 governance units, so it's important to monitor governance usage during requests to optimize performance.
Source: Parameters Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Integration

View all Integration articles →