# List upgrade plans for a server

`GET https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/catalog`

### Overview

Lists available upgrade plans, grouped by product and location. `current_group_id` and `current_location_id` identify the current plan's group and location. `current_disk` is the current disk size. `disk_resize_required` indicates whether the disk must grow, and `migration_allowed` indicates whether the server can move to another location. `has_attached_floating_ips` indicates that a floating IP is attached; plans in another location are still listed, but quoting one is refused until the floating IPs are detached.

A plan listed as available can still be quoted for ten minutes after the catalogue was read, even if the capacity it was listed on is taken in the meantime.

`location_change_fee` and `product_change_fee` are the fixed fees for changing location or product group. Use these to show fees before requesting a quote. When upgrades are unavailable, `enabled` is false and no plans are returned.

### Permissions

Requires the `server.read` (View servers) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `server` (string, required): The server uuid short

## Response 200

The record, as a JSON object. There is no envelope.

- `enabled` (boolean, required): The value of `enabled`.
- `currency` (string, required): The three-letter currency code used for monetary amounts.
- `current_location_id` (integer, required): The current location id ID.
- `current_group_id` (string | null, required): The current group id ID.
- `current_disk` (integer, required): Current primary disk capacity in bytes.
- `disk_resize_required` (boolean, required): The value of `disk_resize_required`.
- `migration_allowed` (boolean, required): The value of `migration_allowed`.
- `has_attached_floating_ips` (boolean, required): Whether the resource has attached floating ips.
- `location_change_fee` (string, required): The value of `location_change_fee`.
- `product_change_fee` (string, required): The value of `product_change_fee`.
- `groups` (object[], required): The value of `groups`.
  - `id` (string, required): The id ID.
  - `name` (string, required): The name shown to customers.
  - `description` (string | null, required): An optional description shown to customers.
  - `subtext` (string | null, required): The value of `subtext`.
  - `speed` (string | null, required): The value of `speed`.
  - `ddr5` (boolean, required): The value of `ddr5`.
  - `locations` (object[], required): The value of `locations`.
    - `id` (string, required): The id ID.
    - `display_name` (string, required): The value of `display_name`.
    - `name` (string, required): The name shown to customers.
    - `flag_url` (string | null, required): The value of `flag_url`.
    - `cid` (integer, required): The value of `cid`.
    - `group_name` (string, required): The value of `group_name`.
    - `location_id` (integer, required): The location id ID.
    - `product_group_id` (integer, required): The product group id ID.
    - `plans` (object[], required): The value of `plans`.
      - `key` (string, required): The value of `key`.
      - `id` (string, required): The id ID.
      - `name` (string, required): The name shown to customers.
      - `vcpu_cores` (integer, required): The value of `vcpu_cores`.
      - `memory` (integer, required): Memory in advertised units; 1000 represents 1 GiB.
      - `disk` (integer, required): Advertised disk capacity in GiB.
      - `bandwidth` (integer, required): Transfer allowance in advertised units; 1000 represents 1 TiB and zero means unlimited.
      - `hdd` (boolean, required): The value of `hdd`.
      - `primary_disk` (integer, required): Primary disk capacity in GiB.
      - `hdd_disk` (integer, required): Secondary hard disk capacity in GiB.
      - `price` (string, required): The value of `price`.
      - `deployment_time` (string | null, required): The value of `deployment_time`.
      - `whmcs_id` (string, required): The billing product identifier.
      - `available` (boolean, required): The value of `available`.
      - `whmcs_url` (string | null, required): The external order URL, when configured.
      - `unavailable_reason` (string | null, required): The value of `unavailable_reason`.
      - `available_with_disk_resize` (boolean, required): The value of `available_with_disk_resize`.
      - `unavailable_with_disk_resize_reason` (string | null, required): The value of `unavailable_with_disk_resize_reason`.
    - `is_current` (boolean, required): Whether the resource is current.

```json
{
  "enabled": true,
  "currency": "USD",
  "current_location_id": 3,
  "current_group_id": "2",
  "current_disk": 85899345920,
  "disk_resize_required": false,
  "migration_allowed": true,
  "has_attached_floating_ips": false,
  "location_change_fee": "5.00",
  "product_change_fee": "2.50",
  "groups": [
    {
      "id": "2",
      "name": "Standard VPS",
      "description": "NVMe storage, DDR5 memory and a 10 Gbps port on every plan.",
      "subtext": null,
      "speed": "10 Gbps",
      "ddr5": true,
      "locations": [
        {
          "id": "2-3",
          "display_name": "Kansas City, MO",
          "name": "Kansas City, MO",
          "flag_url": null,
          "cid": 3,
          "group_name": "Standard VPS",
          "location_id": 3,
          "product_group_id": 2,
          "plans": [
            {
              "key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
              "id": "standard-8gb",
              "name": "Standard 8 GB",
              "vcpu_cores": 6,
              "memory": 8000,
              "disk": 160,
              "bandwidth": 10000,
              "hdd": false,
              "primary_disk": 160,
              "hdd_disk": 0,
              "price": "22.00",
              "deployment_time": "Instant",
              "whmcs_id": "49",
              "available": true,
              "whmcs_url": "https://clients.advinservers.com/cart.php?a=add&pid=49",
              "unavailable_reason": null,
              "available_with_disk_resize": true,
              "unavailable_with_disk_resize_reason": null
            }
          ],
          "is_current": true
        }
      ]
    }
  ]
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/catalog' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
