> For the complete documentation index, see [llms.txt](https://rymera.gitbook.io/advanced-coupons-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/advanced-coupons-api/coupons-v1-acfwp/virtual-coupons/delete-a-virtual-coupon.md).

# Delete a virtual coupon

### DELET&#x45;**:** /wp-json/coupons/v1/virtualcoupons/‌{virtual\_coupon\_id} <a href="#post-wp-json-loyalty-program-v-1-customers-points-user_id" id="post-wp-json-loyalty-program-v-1-customers-points-user_id"></a>

{% tabs %}
{% tab title="Request" %}
**Requirements:**

* Logged-in user
* user role with `manage_woocommerce` user capability

| Method | Endpoint                                                  |
| ------ | --------------------------------------------------------- |
| DELETE | /wp-json/coupons/v1/virtualcoupons/‌{virtual\_coupon\_id} |

| Query Parameters | Required | Type    | Default | Description                                         |
| ---------------- | -------- | ------- | ------- | --------------------------------------------------- |
| ​date\_format    | ​no      | ​string |         | Date format of virtual coupon response date values. |
| {% endtab %}     |          |         |         |                                                     |

{% tab title="Request Example" %}
Delete virtual coupon

```
DELETE: http://example.com/wp-json/coupons/v1/virtualcoupons/‌467
```

{% endtab %}

{% tab title="Response Example" %}
**Status: 200 OK**

Delete a virtual coupon

```
{
  "message": "Successfully deleted virtual coupon.",
  "previous": {
    "key": "467",
    "id": 467,
    "code": "S4WXTUG8DT",
    "main_code": "bogo1",
    "coupon_code": "bogo1-s4wxtug8dt",
    "status": "used",
    "coupon_id": 207,
    "user_id": 0,
    "user_fullname": "",
    "user_email": "",
    "date_created": "June 28, 2021 1:48 pm",
    "date_expire": "January 1, 2022 10:00 am"
  }
}
```

**Status: 403 Forbidden**

```
{
    "code": "rest_forbidden_context",
    "message": "Sorry, you are not allowed access to this endpoint.",
    "data": {
        "status": 401
    }
}
```

{% endtab %}
{% endtabs %}
