---
title: "Delete entity references"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › entities

`DELETE /v2/entities/{entityId}/references/{toEntityId}/{referenceType}`

## Path parameters

- `entityId` (`entity-references-delete.path.entityId`; string, required)
  - format `uuid`
- `toEntityId` (`entity-references-delete.path.toEntityId`; string, required)
  - format `uuid`
- `referenceType` (`entity-references-delete.path.referenceType`; string, required)
  - one of `"credit"`, `"customer"`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://api.sureshake.com/v2/entities/<entityId>/references/<toEntityId>/credit'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<entityId>/references/<toEntityId>/credit';
const options = {method: 'DELETE'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/entities/<entityId>/references/<toEntityId>/credit"

response = requests.delete(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "success": true
}
```

- `success` (`entity-references-delete.response.200.success`; boolean, required)

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.400.error`; object, required)
  - `code` (`entity-references-delete.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.401.error`; object, required)
  - `code` (`entity-references-delete.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.403.error`; object, required)
  - `code` (`entity-references-delete.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.404.error`; object, required)
  - `code` (`entity-references-delete.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.409.error`; object, required)
  - `code` (`entity-references-delete.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.500.error`; object, required)
  - `code` (`entity-references-delete.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-references-delete.response.503.error`; object, required)
  - `code` (`entity-references-delete.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-references-delete.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`entity-references-delete.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-references-delete.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/entity-references-delete/index.md
