# Delete a Wholesale Variation

This API handles deleting a wholesale or non-wholesale variation.&#x20;

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

| Method | Endpoint                                                                 |
| ------ | ------------------------------------------------------------------------ |
| DELETE | /wp-json/wholesale/v1/products/{variable\_id}/variations/{variation\_id} |

| Path parameters | Required | Type    | Description              |
| --------------- | -------- | ------- | ------------------------ |
| variable\_id    | yes      | integer | The variable product ID. |
| variation\_id   | yes      | integer | The variation ID.        |
| {% endtab %}    |          |         |                          |

{% tab title="Request Example" %}

#### Postman

Delete variation

```javascript
DELETE: /wp-json/wholesale/v1/products/{variable_id}/variations/{variation_id}
```

{% endtab %}

{% tab title="Response Example" %}

#### Status: 200 OK

Variation Deleted

```javascript
DELETE: wp-json/wholesale/v1/products/{variable_id}/variations/{variation_id}

Response:
{
    "id": 7082,
    "date_created": "2021-10-21T03:54:57",
    "date_created_gmt": "2021-10-21T03:54:57",
    "date_modified": "2021-10-21T04:07:11",
    "date_modified_gmt": "2021-10-21T04:07:11",
    "description": "",
    "permalink": "https://example.com/product/variable-test/?attribute_pa_color=red",
    "sku": "",
    "price": "29.00",
    "regular_price": "29.00",
    "sale_price": "",
    "date_on_sale_from": null,
    "date_on_sale_from_gmt": null,
    "date_on_sale_to": null,
    "date_on_sale_to_gmt": null,
    "on_sale": false,
    "status": "publish",
    "purchasable": true,
    "virtual": false,
    "downloadable": false,
    "downloads": [],
    "download_limit": -1,
    "download_expiry": -1,
    "tax_status": "taxable",
    "tax_class": "",
    "manage_stock": false,
    "stock_quantity": null,
    "stock_status": "instock",
    "backorders": "no",
    "backorders_allowed": false,
    "backordered": false,
    "low_stock_amount": null,
    "weight": "",
    "dimensions": {
        "length": "",
        "width": "",
        "height": ""
    },
    "shipping_class": "",
    "shipping_class_id": 0,
    "image": null,
    "attributes": [
        {
            "id": 1,
            "name": "Color",
            "option": "Red"
        }
    ],
    "menu_order": 0,
    "wholesale_data": {
        "wholesale_price": {
            "wholesale_customer": "12"
        },
        "wholesale_minimum_order_quantity": {
            "wholesale_customer": "2"
        },
        "wholesale_order_quantity_step": {
            "wholesale_customer": "6"
        },
        "wwpp_product_wholesale_visibility_filter": [
            "wholesale_customer"
        ],
        "wwpp_enable_quantity_discount_rule": "yes",
        "wwpp_quantity_discount_rule_mapping": {
            "desc": "Quantity based discounts available based on how many items are in your cart.",
            "mapping": [
                {
                    "wholesale_role": "WholesaleBronze",
                    "start_qty": "22",
                    "end_qty": "33",
                    "wholesale_discount": "12"
                },
                {
                    "wholesale_role": "wholesale_customer",
                    "start_qty": "22",
                    "end_qty": "33",
                    "wholesale_discount": "7"
                }
            ]
        }
    }
}
```

{% endtab %}
{% endtabs %}

**Note:**&#x20;

* Able to delete wholesale or non-wholesale variation.
* Deleting variation via this API endpoint will force delete the variation. This fixes the issue when variable product is restored, it will pair again with the deleted variation.


---

# 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/variations/delete-a-wholesale-variation.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.
