delete
The delete operation is used to delete an instance of a record. It enables you to delete one record to per request.
SOAP Request
In the following example, a single cash sale record is deleted.
<soap:Body>
<delete xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<baseRef type="cashSale" internalId="1745" xsi:type="q1:RecordRef" xmlns:q1="urn:core_2017_1.platform.webservices.netsuite.com"/>
<deletionReason>
<deletionReasonCode internalId="3" xmlns="urn:core_2017_1.platform.webservices.netsuite.com"/>
<deletionReasonMemo xmlns="urn:core_2017_1.platform.webservices.netsuite.com">Per John in Accounting</deletionReasonMemo>
</deletionReason>
</delete>
</soap:Body>
SOAP Response
The following response confirms that the record has been deleted.
<soapenv:Body>
<deleteResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
<baseRef xsi:type="platformCore:RecordRef" type="cashSale" internalId="1745" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
</writeResponse>
</deleteResponse>
</soapenv:Body>
In REST web services, you can delete a record instance using the DELETE HTTP method. To delete a record instance, you need to specify the record type and the instance identifier.
REST Request
In the following example, a single cash sale record is deleted.
DELETE https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/cashSale/107
REST Response
The following is an excerpt from the response headers of a successful operation, with no body content returned (HTTP Code 204).
Date Thu,14 Feb 2024 15:38:21 GMT
Content-Type application/json