planCreate
Create a plan. The planCreate mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.
Scope required: product:write
For a complete list of input attributes see the PlanAttributes type
mutation planCreate ($attributes: PlanAttributes!) {
planCreate (attributes: $attributes) {
errors
plan {
addon
allowMultipleSubscriptions
availableFrom
availableTo
basePrice
code
contactUsLabel
contactUsUrl
createdAt
customFieldsData
description
hasCustomFields
id
internalNotes
isAvailableNow
isVisible
name
position
pricingDescription
productId
productPlanName
selfServiceBuy
selfServiceCancel
selfServiceRenew
updatedAt
}
planFeatures
}
}
ArgumentsLink to Arguments section
{
"attributes": {
"productId": "456123",
"name": "",
"code": "",
"position": 123,
"addon": true,
"selfServiceBuy": true,
"selfServiceCancel": true,
"selfServiceRenew": true,
"allowMultipleSubscriptions": true,
"description": "",
"internalNotes": "",
"availableFrom": "2022-06-01",
"availableTo": "2022-06-01",
"isVisible": true,
"featureIds": [
"456123"
],
"pricingDescription": "",
"compatiblePlanIds": [
"456123"
],
"pricingStyle": "PlanPricingStyles",
"contactUsLabel": "",
"contactUsUrl": ""
}
}
| Name | Type | Description |
|---|---|---|
| attributes | PlanAttributes |
ResponseLink to Response section
| Name | Type | Description |
|---|---|---|
| errors | List (String) | |
| plan | Plan | |
| planFeatures | List (PlanFeature) |