planUpdate
Update a plan. The planUpdate 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 planUpdate ($id: ID!, $attributes: PlanAttributes!, $planFeatures: [PlanFeatureAttributes!]) {
planUpdate (id: $id, attributes: $attributes, planFeatures: $planFeatures) {
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
}
}
}
ArgumentsLink to Arguments section
{
"id": "456123",
"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": ""
},
"planFeatures": [
{
"id": "456123",
"planId": "",
"featureId": "",
"value": ""
}
]
}
| Name | Type | Description |
|---|---|---|
| id | ID | |
| attributes | PlanAttributes | |
| planFeatures | List (PlanFeatureAttributes) |
ResponseLink to Response section
| Name | Type | Description |
|---|---|---|
| errors | List (String) | |
| plan | Plan |