# DeleteCostCenter

Delete cost center for the given id

`DELETE /api/v2/companies/{companyid}/costcenters/{costcenterid}`

**API:** AvaTax API
**Tag:** CostCenter
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/avatax/api/methods/CostCenter/DeleteCostCenter/

## Description

Deletes a cost center with the specified costcenterId that belongs to the company.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyid` | integer | path | Yes | The ID of the company that owns this cost center object |
| `costcenterid` | integer | path | Yes | The primary key of this cost center |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `TaxProfileErrorResponseModel` |
| 400 | Bad Request | `TaxProfileErrorResponseModel` |
| 401 | Unauthorized | `TaxProfileErrorResponseModel` |
| 403 | Forbidden | `TaxProfileErrorResponseModel` |
| 404 | Not Found | `TaxProfileErrorResponseModel` |
| 409 | Conflict | `TaxProfileErrorResponseModel` |
| 500 | Server Error | `TaxProfileErrorResponseModel` |

### 200 Response: `TaxProfileErrorResponseModel`

Info model for Problem Detail

| Property | Type | Required | Description |
|---|---|---|---|
| `title` | string | No | Title |
| `status` | string | No | Status |
| `detail` | string | No | Detail |

## Example Request

```bash
curl -X DELETE "https://sandbox-rest.avatax.com/api/v2/companies/{companyid}/costcenters/{costcenterid}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```