> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# DeleteAttributeDefinition

# Package: attributes

# Namespace: AttributeDefinitionsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/attributes/attribute-definition/delete-attribute-definition.md

## Introduction

Deletes an attribute definition.

All attribute values for this attribute definition are deleted across every entity.

---

## REST API

### Schema

```
 Method: deleteAttributeDefinition
 Description: Deletes an attribute definition.  All attribute values for this attribute definition are deleted across every entity.
 URL: https://www.wixapis.com/_api/attributes/v1/attribute-definitions/{attributeDefinitionId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  attributeDefinitionId
 Method parameters: 
   param name: attributeDefinitionId | type:   none | required: true 
 Return type: DeleteAttributeDefinitionResponse
  EMPTY-OBJECT {}


```

### Examples

### Delete an attribute definition.
```curl
curl -X DELETE \
'https://www.wixapis.com/attributes/v1/attribute-definitions/d7a341c4-196b-46e7-813c-2b0fc1847ec6' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.attributeDefinition.deleteAttributeDefinition(attributeDefinitionId)
 Description: Deletes an attribute definition.  All attribute values for this attribute definition are deleted across every entity.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  attributeDefinitionId
 Method parameters: 
   param name: attributeDefinitionId | type: string | description: GUID of the attribute definition to delete. | required: true | validation: format GUID
 Return type: PROMISE<DeleteAttributeDefinitionResponse>
  EMPTY-OBJECT {}


```

### Examples

### Delete an attribute definition
```javascript
import { attributeDefinition } from "@wix/bookings";

const attributeDefinitionId = "d7a341c4-196b-46e7-813c-2b0fc1847ec6";

async function deleteAttributeDefinition() {
  await attributeDefinition.deleteAttributeDefinition(attributeDefinitionId);
}

```

### deleteAttributeDefinition (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { attributeDefinition } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { attributeDefinition },
  // Include the auth strategy and host as relevant
});


async function deleteAttributeDefinition(attributeDefinitionId) {
  const response = await myWixClient.attributeDefinition.deleteAttributeDefinition(attributeDefinitionId);
};
```

---