CouponAttributes
Attributes for creating and updating a coupon. The CouponAttributes input type in Bunny's GraphQL API, with its fields and an example.
{
"name": "",
"couponCode": "",
"description": "",
"active": true,
"discountKind": "CouponDiscountKind",
"discountAmount": "1.00",
"discountPercentage": "1.00",
"currencyId": "456123",
"redemptionsMax": 123,
"redemptionEndDate": "2022-06-01",
"duration": 123
}
| Name | Type | Description |
|---|---|---|
| name | String | Name of the coupon |
| couponCode | String | Unique coupon code |
| description | String | Description of the coupon |
| active | Boolean | Is the coupon active |
| discountKind | CouponDiscountKind | Type of discount the coupon applies |
| discountAmount | Float | Amount of the discount |
| discountPercentage | Float | Percent of the discount |
| currencyId | ID | Currency ID of the coupon |
| redemptionsMax | Int | Maximum number of times the coupon can be redeemed |
| redemptionEndDate | ISO8601Date | Date the coupon expires |
| duration | Int | Number of billing periods the coupon applies to. nil means forever. |