Skip to content

List plans a web hosting account can move to

GET /api/v2/shared-hosting/{accountId}/actions/upgrade

List the plans a web hosting account can upgrade or downgrade to, with the yearly price of each. Send an option’s productSlug to POST /api/v2/shared-hosting/{accountId}/actions/upgrade. scheduledChange shows a plan change already scheduled for the next billing period. While it is there, no other change can be chosen. Cancel it with DELETE /api/v2/shared-hosting/{accountId}/actions/upgrade. A downgrade option carries capacityWarning when the account uses more disk than that plan includes. It can still be chosen. The account must be active. A contact needs permission to place orders.

Authentication: An API key with the scope read:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Example

GET /api/v2/shared-hosting/{accountId}/actions/upgrade
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/upgrade" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The plans the account can move to.

Response 200
{
"accountId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"domain": "example.com",
"currencyCode": "SEK",
"actions": {
"canUpgrade": {
"allowed": true,
"reason": null
}
},
"currentPackage": {
"productSlug": "webbhotell-start",
"name": "Start",
"storage": "50 GB",
"ram": "2 GB",
"cpu": "1 vCPU",
"features": [
"Free SSL Certificate",
"Daily Backups"
]
},
"availableOptions": [
{
"productSlug": "webbhotell-business",
"name": "Business",
"type": "upgrade",
"storage": "100 GB",
"ram": "4 GB",
"cpu": "2 vCPU",
"annualPrice": 199,
"currencyCode": "SEK",
"billing": {
"amount": 199,
"currencyCode": "SEK",
"billingCycle": "annually"
},
"features": [
"SSH Access",
"Daily Backups"
],
"order": 2,
"available": true,
"reason": null,
"capacityWarning": null
}
],
"scheduledChange": null
}
Response fields
accountIdstring
The web hosting account ID.
domainstring or null
The account’s primary domain.
currencyCodestring
The account’s currency.
actionsobject
canUpgradeobject
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.
currentPackageobject or null
The account’s plan now.
availableOptionsarray of object
The plans the account can move to.
productSlugstring or null
The plan’s slug. Send it as productSlug to POST.
namestring or null
The plan name.
typestring or null
upgrade for a bigger plan. downgrade for a smaller one. One of upgrade, downgrade.
billingobject
The yearly price.
amountnumber or null
The yearly price in currencyCode.
currencyCodestring
billingCyclestring
Always annually.
availableboolean
Whether this plan can be chosen now.
reasonstring or null
Why not. Null when available is true.
capacityWarningnull
Set on a downgrade when the account uses more disk than this plan includes. Null otherwise. The plan can still be chosen.
scheduledChangenull
A plan change already scheduled for the next billing period. Null when there is none.

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: shared_hosting_not_found, scheduled_change_not_found.
409Conflict. code is account_suspended.
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.