GET
/dashboard/services/{id}/upgrade Get upgrade options
Returns available products the service can be upgraded to.
Parameters
| Name | Type | In | Description |
|---|---|---|---|
id* | integer | path | The service ID |
Response
200
403
successbooleandataobjectserviceobjectidintegerexternal_idintegernullabledomainstringstatusstringactivesuspendedpendingcancelledterminatedsuspend_reasonstringnullablesuspended_atstringnullablebillingCyclestringcancelledbooleancreated_atstringfirstPricenumberpricenumberduedatestringnotestringnullableproductobjectidintegernamestringdescriptionstringnullablepricenumbergroupobjectidintegernamestringavailableProductsarrayRequest
curl -X GET "https://api.royalehosting.net/dashboard/services/{id}/upgrade" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/services/{id}/upgrade", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.get(
"https://api.royalehosting.net/dashboard/services/{id}/upgrade",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true,
"data": {
"service": {
"id": 123,
"external_id": 456,
"domain": "my-vps-server",
"status": "active",
"suspend_reason": null,
"suspended_at": "2024-01-15T10:30:00Z",
"billingCycle": "monthly",
"cancelled": false,
"created_at": "2024-01-01T00:00:00Z",
"firstPrice": 9.99,
"price": 9.99,
"duedate": "2024-02-15T00:00:00Z",
"note": "Production server",
"product": {
"id": 42,
"name": "VPS Pro",
"description": "4 vCPU, 8GB RAM, 100GB SSD",
"price": 9.99,
"group": {
"id": 1,
"name": "VPS"
}
}
},
"availableProducts": [
{
"id": 42,
"name": "VPS Pro",
"description": "4 vCPU, 8GB RAM, 100GB SSD",
"price": 9.99,
"group": {
"id": 1,
"name": "VPS"
}
}
]
}
}