# Bulk create virtual coupons

### POS&#x54;**:** /wp-json/coupons/v1/bulk/virtualcoupons/‌ <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                                  |
| ------ | ----------------------------------------- |
| POST   | /wp-json/coupons/v1/bulk/virtualcoupons/‌ |

| Query Parameters | Required | Type     | Description                                                   |
| ---------------- | -------- | -------- | ------------------------------------------------------------- |
| ​coupon\_id      | ​yes     | ​integer | Coupon ID                                                     |
| count            | yes      | integer  | Number of virtual coupons to be created. Max: 10000 per call. |

{% endtab %}

{% tab title="Request Example" %}
Bulk create virtual coupons

```
POST: http://example.com/wp-json/coupons/v1/bulk/virtualcoupons/‌

JSON Body:
{
    "coupon_id": 207,
    "count": 100
}
```

{% endtab %}

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

Bulk create virtual coupons

```
{
  "message": "100 new virtual coupon codes have been generated for this coupon.",
  "count": 100,
  "total": 154
}
```

**Status: 403 Forbidden**

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

{% endtab %}
{% endtabs %}
