GraphQL
mutation CreateCoupon($input: CreateCouponInput!) { createOneCoupon(input: $input) { id code status type discountValue duration durationInMonths maxRedemptions } }
Show properties
{ "input": { "code": "SAVE20", "type": "PERCENTAGE", "discountValue": 20, "duration": "FOREVER" } }
{ "input": { "code": "SAVE10", "type": "FIXED_AMOUNT", "discountValue": 10, "currency": "USD", "duration": "ONE_TIME" } }
{ "input": { "code": "TRIAL3", "type": "PERCENTAGE", "discountValue": 50, "duration": "REPEATING", "durationInMonths": 3 } }