# Delete tax code

`DELETE /api/configuration/tax-codes/{taxcodeId}`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Delete tax code](https://support.gladstonesoftware.cloud/reference/configuration/delete-tax-code)

## Overview

Deletes a tax code permanently. The tax code is removed outright — there is no inactive flag and no undo — and any translated descriptions held against that tax code are removed with it.

This endpoint performs **no in-use check of its own**. Unlike statuses, titles and document types, nothing stops you deleting a tax code that other configuration still references; the only protection is that a delete blocked by linked records is refused with `409`. Confirm the code is unused with [List all tax codes](list-all-tax-codes.md) and your own reporting before you call this.

Deleting a tax code that does not exist returns `404`, so a repeated delete gives you `404` rather than a silent success. A successful call returns `204 No Content` with an empty body.

## Endpoint

`DELETE {base_url}/api/configuration/tax-codes/{taxcodeId}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `taxCodeId` | string | Yes | The tax code to delete, matching the `id` returned by [List all tax codes](list-all-tax-codes.md). This is the short code itself, not a generated numeric key. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/tax-codes/{taxcodeId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The id path segment is empty. The body is the literal string `Id cannot be null or empty`. |
| `404` | Not found | No tax code exists with that id, including when you repeat a delete that has already succeeded. The body is empty. |
| `409` | Conflict | `There are records linked to the ID {taxCodeId} that are stopping the operation being completed` — the delete was refused because other records still reference the tax code. |
| `500` | Internal server error | Any other unexpected server-side failure. |
