Delete Objects
The Delete Objects API allows you to delete existing records in Salesforce through Nue's Revenue Lifecycle API. This endpoint supports both single and bulk deletions.
Required Permission
Your API key must be associated with a role that has Manage Salesforce Orders and/or Manage Quotes permission enabled under the "Nue on Salesforce" category.
Endpoint
DELETE /api/objects/{objectName}/{id}Supported Objects
Object | Description |
|---|---|
Customer | Delete customer accounts (maps to Salesforce Account) |
Opportunity | Delete sales opportunities |
Quote | Delete quote records |
QuoteLineItem | Delete quote line items |
Order | Delete order records |
OrderProduct | Delete order line items |
Important: Deletion Constraints
Some objects have restrictions on when they can be deleted:
- Published products cannot be deleted (status must not be "Published" or "Outdated")
- Objects with dependent records may require those records to be deleted first
- Deletion permissions depend on your Salesforce org's field-level security and sharing rules
Authentication
Include your API key in the request header:
curl -X DELETE 'https://api.nue.io/api/objects/Customer/001D000000IRFmaIAH' \
-H 'nue-api-key: YOUR_API_KEY'Delete Customer
Delete an existing customer account.
Request
curl -X DELETE 'https://api.nue.io/api/objects/Customer/001D000000IRFmaIAH' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Delete Opportunity
Delete an existing sales opportunity.
Request
curl -X DELETE 'https://api.nue.io/api/objects/Opportunity/006D000000IqhSLIAZ' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Delete Quote
Delete an existing quote record.
Request
curl -X DELETE 'https://api.nue.io/api/objects/Quote/0Q0Em000006xbGDKAY' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Delete Quote Line Item
Delete an existing quote line item.
Request
curl -X DELETE 'https://api.nue.io/api/objects/QuoteLineItem/0QLEm000001ojarOAA' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Delete Order
Delete an existing order record.
Request
curl -X DELETE 'https://api.nue.io/api/objects/Order/801Em000011N4dNIAS' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Delete Order Product
Delete an existing order line item.
Request
curl -X DELETE 'https://api.nue.io/api/objects/OrderProduct/802D000000IZ4ABCD' \
-H 'nue-api-key: YOUR_API_KEY'Response
A successful deletion returns HTTP 200 with an empty body.
Bulk Delete
Delete multiple records of the same object type in a single request.
Endpoint
DELETE /api/objects/{objectName}ListRequest
curl -X DELETE 'https://api.nue.io/api/objects/CustomerList' \
-H 'nue-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"idList": [
"001D000000IRFmaIAH",
"001D000000IRFmbIAH",
"001D000000IRFmcIAH"
]
}'Request Body
Field | Type | Required | Description |
|---|---|---|---|
idList | array | Yes | Array of Salesforce record IDs to delete |
Response
A successful bulk deletion returns HTTP 200 with an empty body.
Error Handling
Common Error Responses
Status Code | Error | Description |
|---|---|---|
400 | Bad Request | Invalid request format or missing required ID |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | Insufficient permissions or object type not accessible |
404 | Not Found | Record not found with the specified ID |
409 | Conflict | Record cannot be deleted due to constraints |
Example Error Response
{
"title": "Oops! An error occurred",
"message": "Provided external ID field does not exist or is not accessible: INVALID_ID_HERE",
"errorCode": "NOT_FOUND"
}