deleteList
In SOAP web services, the deleteList operations is used to delete one or more record instances. The record instances can be of various record types. For example, it is possible to delete a customer and a contact within a single request by using this operation.
SOAP Request
The following SOAP request shows how to delete an employee and calendar event record.
<soap:Body>
<deleteList xmlns="urn:messages_2025_1.platform.webservices.netsuite.com">
<baseRef type="employee" internalId="360" xsi:type="q1:RecordRef" xmlns:q1="urn:core_2025_1.platform.webservices.netsuite.com"/>
<baseRef type="calendarEvent" internalId="381" xsi:type="q2:RecordRef" xmlns:q2="urn:core_2025_1.platform.webservices.netsuite.com"/>
</deleteList>
</soap:Body>
SOAP Response
In the response, the status for each item in the request is returned. If a problem exists with one of the items, creating an error, the other records are still processed.
<soapenv:Body>
<deleteListResponse xmlns="urn:messages_2025_1.platform.webservices.netsuite.com">
<writeResponseList>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com"/>
<writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com"/>
<baseRef xsi:type="platformCore:RecordRef" type="employee" internalId="360" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com"/>
</writeResponse>
<writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com"/>
<baseRef xsi:type="platformCore:RecordRef" type="calendarEvent" internalId="381" xmlns:platformCore="urn:core_2025_1.platform.webservices.netsuite.com"/>
</writeResponse>
</writeResponseList>
</deleteListResponse>
</soapenv:Body>
In REST web services, you can use batch operations to delete multiple instances of the same record type in a single REST request.
Batch operations in REST web services are executed asynchronously and in parallel. You can currently work with a maximum of 100 records in one batch request.
When you use batch operations for deleting records, you must specify the prefer: respond-async REST request header.
Additionally, you can specify the X-NetSuite-idempotency-key header with a unique idempotency key value. For an example, see Sending an Asynchronous Request Using an Idempotency Key.
REST Request
To delete a collection of records, you must specify the ids URL parameter, containing the internal or external ID of the existing records.
The following example shows the structure of a batch DELETE request.
URL:
DELETE https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder?ids=1,2
HEADERS:
Authorization: /*Auth token goes here*/
BODY:
REST Response
Asynchronous batch requests return a response with a link to the newly created asynchronous task. The following is an example of a response. Then you can send a request using the job ID in the response header to retrieve the list of tasks.
Response:
HTTP CODE: HTTP 202
BODY:
HEADERS:
Preference-Applied: respond-async
location: https://demo123.suitetalk.api.netsuite.com/services/rest/async/v1/job/1