mutation couponCreate ($attributes: CouponAttributes!, $accountId: ID!, $planId: ID!) {
couponCreate (attributes: $attributes, accountId: $accountId, planId: $planId) {
coupon {
active
couponCode
createdAt
currencyId
description
discountAmount
discountPercentage
id
name
planId
redemptionEndDate
redemptionsCount
redemptionsMax
updatedAt
}
errors
}
}
{
"attributes": {
"name": "",
"couponCode": "",
"description": "",
"active": true,
"discountKind": "CouponDiscountKind",
"discountAmount": "1.00",
"discountPercentage": "1.00",
"currencyId": "456123",
"redemptionsMax": 123,
"redemptionEndDate": "2022-06-01"
},
"accountId": "456123",
"planId": "456123"
}