# List Category Discounts

This API handles fetching wholesale category discounts.

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

| Method       | Endpoint                                |
| ------------ | --------------------------------------- |
| GET          | /wp-json/wholesale/v1/category-discount |
| {% endtab %} |                                         |

{% tab title="Request Example" %}

#### Postman

List all category with wholesale discounts:

```javascript
GET: /wp-json/wholesale/v1/category-discount
```

{% endtab %}

{% tab title="Response Example" %}

#### Status: 200 OK

List all category with wholesale discounts

```
GET: /wp-json/wholesale/v1/category-discount

Response:
[
    {
        "id": 15,
        "name": "Uncategorized",
        "wholesale_discounts": {
            "wholesale_customer_wholesale_discount": 123,
            "WholesaleBronze_wholesale_discount": 0
        }
    },
    {
        "id": 30,
        "name": "Wholesale",
        "wholesale_discounts": {
            "wholesale_customer_wholesale_discount": 10,
            "WholesaleBronze_wholesale_discount": 20
        }
    },
    {
        "id": 697,
        "name": "Accessories",
        "wholesale_discounts": {
            "wholesale_customer_wholesale_discount": 0,
            "WholesaleBronze_wholesale_discount": 0
        }
    }
]
```

{% endtab %}
{% endtabs %}

**Note:**

* This will get all category with wholesale discounts set and those previously unset the wholesale discount.
* If the return data is empty, meaning no wholesale discount set.


---

# 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://rymera.gitbook.io/wholesale-suite-api/wholesale-v1-wwpp/category-discounts/list-category-discounts.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.
