---
title: Delete Objects
slug: delete-objects
docTags: 
createdAt: 2026-03-17T21:13:53.446Z
---

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.

:::hint{type="info"}
**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

```javascript
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                               |

::::BlockQuote
**Important: Deletion Constraints**Some objects have restrictions on when they can be deleted:

:::Paragraph{listStyleType="disc" indent="1"}
**Published products** cannot be deleted (status must not be "Published" or "Outdated")
:::

:::Paragraph{listStyleType="disc" indent="1"}
Objects with dependent records may require those records to be deleted first
:::

:::Paragraph{listStyleType="disc" listStart="2" indent="1"}
Deletion permissions depend on your Salesforce org's field-level security and sharing rules
:::
::::

## Authentication

Include your API key in the request header:

```bash
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

```bash
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

```bash
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

```bash
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

```bash
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

```bash
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

```bash
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

```javascript
DELETE /api/objects/{objectName}List
```

### Request

```bash
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

```json
{
  "title": "Oops! An error occurred",
  "message": "Provided external ID field does not exist or is not accessible: INVALID_ID_HERE",
  "errorCode": "NOT_FOUND"
}
```
