Skip to content

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

idstringrequired
The VPS ID (vps_…).

Example

GET /api/v2/vps/{id}/actions/upgrade
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.

Response 200
{
"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
vpsIdstring
currentProductnull
configurableOptionsarray of object
The current plan options, such as bandwidthGb, backupSlots, ipv4Count or additionalStorageGb. To change only these, use POST /api/v2/vps/{id}/actions/config, not actions/upgrade.
keystring
The option key to send under resources to POST /api/v2/vps/{id}/actions/config.
labelstring
typestring
One of slider, quantity, toggle, input, select.
minnumber
maxnumber
stepnumber
defaultnumber | string | boolean or null
currentValuenumber | string | boolean or null
unitstring or null
pricingarray of object
billingCyclestring
amountnumber
currencyCodestring
includedAtBasenumber or null
How much of this option the current plan includes before paid extras.
requiredboolean
choicesarray of object
valuestring
labelstring
osTemplateIdstring
constraintsobject
Limits that apply now. For bandwidth, use in the current period can raise the minimum above the plan minimum.
minnumber or null
maxnumber or null
stepnumber or null
unitstring or null
currentValuenumber | string | boolean or null
effectiveMinnumber or null
effectiveMaxnumber or null
usageobject
bandwidthUsedGbnumber
Bandwidth used in the current period, when it raises the lowest bandwidth you can order.
actionsobject
canDecreaseobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
canIncreaseobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
actionsobject
canDecreaseobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
canIncreaseobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
availablePlansarray of object
idstring or null
slugstring or null
The plan slug. Send it as productSlug to change plan.
tierstring
namestring or null
resourcesobject
cpuCoresnumber or null
memoryGbnumber or null
storageGbnumber or null
bandwidthobject
limitGbnumber or null
billingobject
amountnumber
currencyCodestring
billingCyclestring
billingCyclesarray of object
billingCyclestring
amountnumber
currencyCodestring
isPrimaryboolean
setupAmountnumber or null
One-time setup fee for this billing cycle. Null when there is none.
availabilityStatusstring
One of available, hidden, out_of_stock.
availableboolean
reasonstring or null
actionsobject
canApplyobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
actionsobject
canChangeProductobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.
scheduledChangenull
blockerobject
codestring
One of pending_order_blocking, existing_invoice_blocking.
reasonstring
blockingInvoiceobject
idstring
numberstring or null
amountnumber
currencyCodestring
dueAtstring or null
statusstring
One of draft, unpaid, partially_paid, paid, cancelled, refunded.
paymentUrlstring or null
Link to open the invoice.
paymentMethodsobject
cardobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
accountCreditobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
swishobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
bankgiroobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
sepaobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
alipayobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
cryptoobject
methodstring
The payment method, the same as its key in paymentMethods. Card checkout and wallets are all card. One of card, accountCredit, swish, bankgiro, sepa, alipay, crypto.
labelstring
The method’s name, for display.
availableboolean
visibleboolean
Present for restricted methods. When false, don’t show the method to the customer.
reasonstring or null
Why the method cannot be used, when available is false.
checkoutModestring or null
The kind of hosted checkout the payment session uses. Null for methods without a hosted checkout. One of payment, sepa_bank_transfer_payment, alipay_payment.
requirementsobject
What the payment method needs. Examples: a minimum amount for card, a Swedish account for Swish and bankgiro, EUR for a SEPA bank transfer, an eligible account for cryptocurrency, enough account credit.
invoiceCurrencyCodestring
invoiceCurrencyCodesarray of string
accountCountryCodestring
accountCountryExcludedCodestring
A billing country this method does not accept.
accountTypestring
One of private, organisation.
accountCurrencyCodestring
requiresCardVerificationboolean
Whether a saved card or an earlier successful card payment is needed.
availableBalanceobject
amountnumber
currencyCodestring
minimumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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.
maximumAmountobject
amountnumber
currencyCodestring
comparisonstring
How the payment amount must compare with amount. 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 string
actionsobject
canPayWithAvailableMethodobject
allowedboolean
True when the action can be called now.
reasonstring or null
Why the action is blocked, ready to show. Null when allowed is true.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not 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.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.