# List server plans

`GET https://console.advinservers.com/api/v1/client/servers/catalog`

### Overview

Lists available plans and prices. `groups` contains plans grouped by product and location. `billing_cycles` lists the available payment periods and their lengths in months. `default_billing_cycle` is used when an order does not specify a cycle. `currency` applies to all prices. `payment_window_minutes` is the time allowed to pay for an order.

New servers are created in `default_team`, which is the team the request works in. The SSH keys and script an order names are taken from the same team. `is_active` is always true.

When ordering is unavailable, `enabled` is false, `message` explains why, 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.

## 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.
- `payment_window_minutes` (integer, required): How many minutes the original payment window allowed.
- `billing_cycles` (object[], required): The value of `billing_cycles`.
  - `value` (string, required): The value of `value`.
  - `label` (string, required): A short label shown to customers.
  - `months` (integer, required): The value of `months`.
- `default_billing_cycle` (string, required): The value of `default_billing_cycle`.
- `default_team` (object, required): The value of `default_team`.
  - `id` (string<uuid> | null, required): The id ID.
  - `name` (string | null, required): The name shown to customers.
  - `is_active` (boolean, required): Whether the resource is active.
- `message` (string | null, required): The message text.
- `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`.
      - `stock` (integer | null, required): The value of `stock`.

```json
{
  "enabled": true,
  "currency": "USD",
  "payment_window_minutes": 30,
  "billing_cycles": [
    {
      "value": "monthly",
      "label": "Monthly",
      "months": 1
    },
    {
      "value": "quarterly",
      "label": "Quarterly",
      "months": 3
    },
    {
      "value": "semiannually",
      "label": "Semi-annually",
      "months": 6
    },
    {
      "value": "annually",
      "label": "Yearly",
      "months": 12
    }
  ],
  "default_billing_cycle": "monthly",
  "default_team": {
    "id": "fbb31f5f-bd6f-4019-a3ed-1062a28f56f7",
    "name": "Anomalous Materials",
    "is_active": true
  },
  "message": null,
  "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": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
              "id": "standard-4gb",
              "name": "Standard 4 GB",
              "vcpu_cores": 4,
              "memory": 4000,
              "disk": 80,
              "bandwidth": 5000,
              "hdd": false,
              "primary_disk": 80,
              "hdd_disk": 0,
              "price": "12.00",
              "deployment_time": "Instant",
              "whmcs_id": "48",
              "available": true,
              "stock": 14
            }
          ]
        }
      ]
    }
  ]
}
```

## 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.
- `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/catalog' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
