approvalRuleCreate

Create an approval rule. The approvalRuleCreate mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.

Scope required: security:write

For a complete list of input attributes see the ApprovalRuleAttributes type

mutation approvalRuleCreate ($attributes: ApprovalRuleAttributes!) {
  approvalRuleCreate (attributes: $attributes) {
      approvalRule {
        active
        anyDiscount
        anyDiscountEnabled
        approverId
        billingPeriodEnabled
        fromDate
        id
        isRampEnabled
        name
        netPaymentDays
        netPaymentDaysEnabled
        overallQuoteDiscount
        overallQuoteDiscountEnabled
        planId
        planIdEnabled
        productId
        productIdEnabled
        requireUnanimousApproval
        toDate
        totalQuoteAmount
        totalQuoteAmountEnabled
        warrenId
      }
      errors
  }
}

ArgumentsLink to Arguments section

{
  "attributes": {
    "name": "",
    "active": true,
    "fromDate": "2022-06-01",
    "toDate": "2022-06-01",
    "approverIds": [
      "456123"
    ],
    "approverId": "456123",
    "requireUnanimousApproval": true,
    "totalQuoteAmount": 123,
    "totalQuoteAmountEnabled": true,
    "netPaymentDays": 123,
    "netPaymentDaysEnabled": true,
    "overallQuoteDiscount": 123,
    "overallQuoteDiscountEnabled": true,
    "anyDiscountEnabled": true,
    "anyDiscount": 123,
    "productIdEnabled": true,
    "productId": "456123",
    "planIdEnabled": true,
    "planId": "456123",
    "billingPeriodEnabled": true,
    "billingPeriod": "BillingPeriod",
    "isRampEnabled": true
  }
}
Name Type Description
attributes ApprovalRuleAttributes  

ResponseLink to Response section

Name Type Description
approvalRule ApprovalRule  
errors List (String)