> For the complete documentation index, see [llms.txt](https://tri.gitbook.io/tri-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tri.gitbook.io/tri-doc/liquidity-pool/delete-employee.md).

# Delete Employee

### Liquidity Pool

<mark style="color:red;">`DELETE`</mark> <https://sandbox.triangle.digital/api/v2/liquidity\\_pool/clients/{client\\_id}/employees/{employee\\_id}>

Deletes one employee of the client. The deletion is refused while anything is still attached to the employee, and the `message` says what has to be cleared first:

* a Stripe card — remove it with [Delete Credit Card](/tri-doc/liquidity-pool/delete-credit-card.md);
* a MasterCard card — remove it with [Delete MasterCard Card](/tri-doc/liquidity-pool/delete-mastercard-card.md);
* invoices — delete them, or move them to another employee with [Edit Invoice](/tri-doc/liquidity-pool/edit-invoice.md);
* a positive Carbon Pool balance — spend it;
* a balance operation still in progress — wait for it to finish.

An Individual Consumption cannot be deleted here or anywhere else: it lives in the same table but is addressed by its own uuid, and this call answers `Employee not found for this client.` for one.

**Path parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="230">Name</th><th width="110">Type</th><th>Description</th><th width="210">Where to take it from</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>integer</td><td><strong>Required.</strong> The client the employee belongs to.</td><td><a href="/tri-doc/liquidity-pool/get-clients.md">Get Clients</a> — <code>client_id</code></td></tr><tr><td><code>employee_id</code></td><td>integer</td><td><strong>Required.</strong> The employee to delete.</td><td><a href="/tri-doc/liquidity-pool/get-employees.md">Get Employees</a> — <code>employee_id</code></td></tr></tbody></table>

**Headers**

<table data-full-width="true"><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr></tbody></table>

**Query parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="220">Name</th><th width="110">Type</th><th>Description</th><th width="260">Example</th></tr></thead><tbody><tr><td><code>hash</code></td><td>string</td><td><strong>Required.</strong> API key.</td><td>fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1</td></tr></tbody></table>

**Response fields**

<table data-full-width="true" data-search="false"><thead><tr><th width="300">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td>string</td><td>Human-readable result of the call; on a refusal it names what is still attached.</td></tr><tr><td><code>success</code></td><td>boolean</td><td>Whether the employee was deleted; a refused call answers HTTP 400.</td></tr><tr><td><code>data.employee_id</code></td><td>integer</td><td>The employee that was deleted.</td></tr><tr><td><code>operations_count</code></td><td>integer</td><td>Always <code>1</code>.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}
{% code fullWidth="false" %}

```json
{
    "message": "Employee deleted successfully",
    "success": true,
    "data": {
        "employee_id": 18
    },
    "operations_count": 1
}
```

{% endcode %}
{% endtab %}

{% tab title="400" %}
Nothing was deleted. The `message` says what exactly: `Employee not found for this client.` — the employee is unknown, belongs to another client, or is an Individual Consumption; `Cannot delete: a credit card is attached. Remove the card first.`; `Cannot delete: a MasterCard card is attached. Remove the card first.`; `Cannot delete: the employee has invoices attached.`; `Cannot delete: the employee has a positive Carbon Pool balance.`; `Cannot delete: a Carbon Pool balance operation is in progress for this employee.`

```json
{
    "message": "Cannot delete: the employee has invoices attached.",
    "success": false,
    "data": {},
    "operations_count": 1
}
```

{% endtab %}
{% endtabs %}
