> For the complete documentation index, see [llms.txt](https://rymera.gitbook.io/wholesale-suite-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rymera.gitbook.io/wholesale-suite-api/wholesale-v1-wwpp/category-discounts/list-category-discounts.md).

# 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.
