Change plan
change_planSwitch a VPS to another plan by converting remaining service value to the new price; upgrades shorten the service period. Calculate the conversion first and confirm the new expiry.
Instructions
Change VPS plan. No payment is taken; the remaining value is converted at the new price, so an upgrade shortens the service period. Always call calculate_plan_change first and confirm the new expiry with the customer. Use get_plan_resources to get resource IDs for the target plan. Requires services:manage and a full-access API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | Plan ID from get_plan_options | |
| orderNo | Yes | Tenant-owned service order number: 1-64 ASCII letters, digits or hyphens, e.g. VP12345 or VP12345-1 | |
| resources | Yes | Array of numeric resource value IDs — one per resource type (RAM, SSD, IP, etc.). Get IDs from get_plan_resources response: each resource type has 'values' array, pick one value's 'id' per type. A type left out keeps its current value; an id the target plan does not offer is refused with 422 invalidResources. |