List VPS plan change options
GET /api/v2/vps/{id}/actions/upgrade
Lists the plans a VPS can move to, the add-ons it has now and any plan change already booked for the next period. To change plan, send an availablePlans[].slug as productSlug to POST /api/v2/vps/{id}/actions/upgrade. To change add-ons such as bandwidthGb or snapshotSlots without changing plan, send configurableOptions[].key values to POST /api/v2/vps/{id}/actions/config. Each plan’s actions.canApply says whether it can be chosen now. blocker names an unpaid invoice or a pending order that blocks every plan. While scheduledChange is set, no other plan or add-on change can be made. Cancel it with DELETE /api/v2/vps/{id}/actions/upgrade. In scheduledChange.target.resources, storageGb can be larger than the new plan’s included disk because disk storage cannot be reduced in place.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/upgrade" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Plan change options for the VPS.
{ "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "currentProduct": { "id": "vpsprod_01hxa3b4c5d6e7f8g9h0j1k2m3", "slug": "vps-xs", "tier": "xs", "name": "VPS XS", "resources": { "cpuCores": 1, "memoryGb": 2, "storageGb": 40 }, "bandwidth": { "limitGb": 2048 }, "billing": { "amount": 79, "currencyCode": "SEK", "billingCycle": "monthly" }, "billingCycles": [ { "billingCycle": "monthly", "amount": 79, "currencyCode": "SEK", "isPrimary": true, "setupAmount": null } ], "availabilityStatus": "out_of_stock", "available": false, "reason": "This plan is not currently offered." }, "configurableOptions": [ { "key": "bandwidthGb", "label": "Bandwidth", "type": "slider", "min": 2048, "max": 10240, "step": 1024, "default": 2048, "currentValue": 2048, "unit": "GB", "pricing": [ { "billingCycle": "monthly", "amount": 20, "currencyCode": "SEK" } ], "constraints": { "min": 2048, "max": 10240, "step": 1024, "unit": "GB", "currentValue": 2048, "effectiveMin": 2048, "effectiveMax": 10240, "usage": { "bandwidthUsedGb": 193.483 }, "actions": { "canDecrease": { "allowed": true, "reason": null }, "canIncrease": { "allowed": true, "reason": null } } }, "includedAtBase": 2048, "actions": { "canDecrease": { "allowed": true, "reason": null }, "canIncrease": { "allowed": true, "reason": null } } }, { "key": "additionalStorageGb", "label": "Attachable Block Storage", "type": "slider", "min": 0, "max": 1000, "step": 10, "default": 0, "currentValue": 100, "unit": "GB", "pricing": [ { "billingCycle": "monthly", "amount": 30, "currencyCode": "SEK" } ], "constraints": { "min": 100, "max": 1000, "step": 10, "unit": "GB", "currentValue": 100, "effectiveMin": 100, "effectiveMax": 1000, "actions": { "canDecrease": { "allowed": true, "reason": null }, "canIncrease": { "allowed": true, "reason": null } } }, "includedAtBase": 100, "actions": { "canDecrease": { "allowed": true, "reason": null }, "canIncrease": { "allowed": true, "reason": null } } }, { "key": "snapshotSlots", "label": "Snapshot slots", "type": "quantity", "min": 0, "max": 5, "step": 1, "default": 0, "currentValue": 0, "unit": "slots", "pricing": [ { "billingCycle": "monthly", "amount": 10, "currencyCode": "SEK" } ], "constraints": { "min": 0, "max": 5, "step": 1, "unit": "slots", "currentValue": 0, "effectiveMin": 0, "effectiveMax": 5, "actions": { "canDecrease": { "allowed": false, "reason": "No snapshot slots are currently active." }, "canIncrease": { "allowed": true, "reason": null } } }, "includedAtBase": 0, "actions": { "canDecrease": { "allowed": false, "reason": "No snapshot slots are currently active." }, "canIncrease": { "allowed": true, "reason": null } } } ], "availablePlans": [ { "id": "vpsprod_01hxa3b4c5d6e7f8g9h0j1k2m4", "slug": "vps-sm", "tier": "sm", "name": "VPS SM", "resources": { "cpuCores": 2, "memoryGb": 4, "storageGb": 80 }, "bandwidth": { "limitGb": 4096 }, "billing": { "amount": 149, "currencyCode": "SEK", "billingCycle": "monthly" }, "billingCycles": [ { "billingCycle": "monthly", "amount": 149, "currencyCode": "SEK", "isPrimary": true, "setupAmount": null } ], "availabilityStatus": "available", "available": true, "reason": null, "actions": { "canApply": { "allowed": true, "reason": null } } } ], "actions": { "canChangeProduct": { "allowed": true, "reason": null } }, "scheduledChange": null}Response fields
vpsIdstringcurrentProductnullconfigurableOptionsarray of objectbandwidthGb, backupSlots, ipv4Count or additionalStorageGb. To change only these, use POST /api/v2/vps/{id}/actions/config, not actions/upgrade.keystringresources to POST /api/v2/vps/{id}/actions/config.labelstringtypestringslider, quantity, toggle, input, select.minnumbermaxnumberstepnumberdefaultnumber | string | boolean or nullcurrentValuenumber | string | boolean or nullunitstring or nullpricingarray of objectbillingCyclestringamountnumbercurrencyCodestringincludedAtBasenumber or nullrequiredbooleanchoicesarray of objectvaluestringlabelstringosTemplateIdstringconstraintsobjectminnumber or nullmaxnumber or nullstepnumber or nullunitstring or nullcurrentValuenumber | string | boolean or nulleffectiveMinnumber or nulleffectiveMaxnumber or nullusageobjectbandwidthUsedGbnumberactionsobjectcanDecreaseobjectallowedbooleanreasonstring or nullallowed is true.canIncreaseobjectallowedbooleanreasonstring or nullallowed is true.actionsobjectcanDecreaseobjectallowedbooleanreasonstring or nullallowed is true.canIncreaseobjectallowedbooleanreasonstring or nullallowed is true.availablePlansarray of objectidstring or nullslugstring or nullproductSlug to change plan.tierstringnamestring or nullresourcesobjectcpuCoresnumber or nullmemoryGbnumber or nullstorageGbnumber or nullbandwidthobjectlimitGbnumber or nullbillingobjectamountnumbercurrencyCodestringbillingCyclestringbillingCyclesarray of objectbillingCyclestringamountnumbercurrencyCodestringisPrimarybooleansetupAmountnumber or nullavailabilityStatusstringavailable, hidden, out_of_stock.availablebooleanreasonstring or nullactionsobjectcanApplyobjectallowedbooleanreasonstring or nullallowed is true.actionsobjectcanChangeProductobjectallowedbooleanreasonstring or nullallowed is true.scheduledChangenullblockerobjectcodestringpending_order_blocking, existing_invoice_blocking.reasonstringblockingInvoiceobjectidstringnumberstring or nullamountnumbercurrencyCodestringdueAtstring or nullstatusstringdraft, unpaid, partially_paid, paid, cancelled, refunded.paymentUrlstring or nullpaymentMethodsobjectcardobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.accountCreditobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.swishobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.bankgiroobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.sepaobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.alipayobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.cryptoobjectmethodstringpaymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.labelstringavailablebooleanvisiblebooleanreasonstring or nullavailable is false.checkoutModestring or nullpayment, sepa_bank_transfer_payment, alipay_payment.requirementsobjectinvoiceCurrencyCodestringinvoiceCurrencyCodesarray of stringaccountCountryCodestringaccountCountryExcludedCodestringaccountTypestringprivate, organisation.accountCurrencyCodestringrequiresCardVerificationbooleanavailableBalanceobjectamountnumbercurrencyCodestringminimumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.maximumAmountobjectamountnumbercurrencyCodestringcomparisonstringamount. greater_than: more than it, used in minimumAmount. less_than_or_equal: at most it, used in maximumAmount. One of greater_than, less_than_or_equal.availablePaymentMethodsarray of stringactionsobjectcanPayWithAvailableMethodobjectallowedbooleanreasonstring or nullallowed is true.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code names the missing resource: vps_not_found, plan_not_found, scheduled_change_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |