---
title: "Check if a client can be deleted (test environment only)"
method: GET
path: "/clients/{externalTenantId}/is-deletable"
tags: ["Clients"]
---

# Check if a client can be deleted (test environment only)

`GET /clients/{externalTenantId}/is-deletable`

## Request

- Base URL: `https://referral-api.debitura.com`
- URL: `https://referral-api.debitura.com/clients/{externalTenantId}/is-deletable`
- Auth: API key in header `XApiKey`

Checks whether a client can be safely deleted for testing purposes.

⚠️ **TEST ENVIRONMENT ONLY** - This endpoint is only available on the test environment.

Use this endpoint before calling DELETE to verify the client can be removed.

A client can be deleted if:
- They have no active collection cases (only pending cases are allowed)
- They have no leads with active quotes

Returns
- **isDeletable**: true if the client can be deleted
- **blockers**: list of reasons why deletion is blocked (if any)

## Path parameters

- `externalTenantId` string, required

## Response `200`

Deletability check completed

- DebituraWebReferralPartnerApiModelsClientsClientDeletableResponse: Response indicating whether a client can be deleted.
  - `isDeletable` boolean: True if the client can be safely deleted.
  - `blockers` string[], nullable: List of reasons why the client cannot be deleted (empty if IsDeletable is true).

## Other responses

- `403`: Endpoint not available in production environment
- `404`: No active client link found for this externalTenantId
- `500`: Internal server error

---

[API](https://skmtc.dev/debitura/apis/debitura-referral-partner-api.md) - [All operations](https://skmtc.dev/debitura/apis/debitura-referral-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/debitura/apis/debitura-referral-partner-api/revisions/cf12c7f270d9?raw)
