# Categories

## Delete category

<mark style="color:red;">`DELETE`</mark> `https://api.woowup.com/apiv3/categories`

Delete a parent category and their childs

#### Request Body

| Name       | Type   | Description                       |
| ---------- | ------ | --------------------------------- |
| code       | string | Category code                     |
| notify\_to | string | email to receive the confirmation |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "payload": {
        "request_id": "xxxx"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
```

{% endtab %}

{% tab title="400 " %}

```javascript
{
    "payload": {
        "errors": [
            "Required properties missing: [\"code\"]"
        ]
    },
    "message": "bad request",
    "code": "bad_request",
    "time": "57ms"
}
```

{% endtab %}

{% tab title="403 " %}

```javascript
{
    "payload": [],
    "message": "forbidden: authentication failed",
    "code": "forbidden",
    "time": "7ms"
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "payload": {
        "errors": [
            "category not found"
        ]
    },
    "message": "category not found",
    "code": "not_found",
    "time": "114ms"
}
```

{% endtab %}

{% tab title="500 " %}

```javascript
{
    "payload": [],
    "message": "",
    "code": "internal_error",
    "time": "72ms"
}
```

{% endtab %}
{% endtabs %}

**Example**

```bash
curl -X DELETE \
  https://api.woowup.com/apiv3/categories \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
	"code": "abcd",
	"notify_to": "test@email.com"
}'
```

**Response**

```javascript
{
    "payload": {
        "request_id": "XXXX"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
```

## Delete categories (bulk)

<mark style="color:red;">`DELETE`</mark> `https://api.woowup.com/apiv3/categories/bulk`

Delete all categories

#### Request Body

| Name       | Type   | Description                       |
| ---------- | ------ | --------------------------------- |
| notify\_to | string | email to receive the confirmation |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "payload": {
        "request_id": "xxxx"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
```

{% endtab %}

{% tab title="403 " %}

```javascript
{
    "payload": [],
    "message": "forbidden: authentication failed",
    "code": "forbidden",
    "time": "7ms"
}
```

{% endtab %}

{% tab title="500 " %}

```javascript
{
    "payload": [],
    "message": "",
    "code": "internal_error",
    "time": "72ms"
}
```

{% endtab %}
{% endtabs %}

**Example**

```bash
curl -X DELETE \
  https://api.woowup.com/apiv3/categories/bulk \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
	"notify_to": "test@email.com"
}'
```

**Response**

```javascript
{
    "payload": {
        "request_id": "XXXX"
    },
    "message": "ok",
    "code": "ok",
    "time": "62ms"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://woowup-docs.gitbook.io/woowup-developer-docs/api/categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
