# Offers

Offers are the instant servers in stock right now, with their specs, prices and OS choices. Pick one here before you [order](orders.md). Needs the `read` permission.

## List offers

`GET /offers` returns every instant server your account can order now. The list is not paged.

```bash
curl -sS https://api.redswitches.com/v1/offers \
  -H "Authorization: Bearer $REDSWITCHES_API_KEY"
```

```ts
const { data: offers } = await rs.offers.list();
const amsterdam = offers.filter((o) => o.location?.city === "Amsterdam");
```

```python
offers = client.offers.list().data
amsterdam = [o for o in offers if o.location and o.location.city == "Amsterdam"]
```

```go
offers, err := client.Offers.List(ctx)
if err != nil {
	log.Fatal(err)
}
for _, o := range offers.Data {
	fmt.Println(o.ID, o.Name, o.Stock)
}
```

```json
{
  "data": [
    {
      "id": "ofr_12",
      "name": "Instant Dedicated Server E-2388G",
      "location": { "city": "Amsterdam", "country": "NL" },
      "cpu": "Intel Xeon E-2388G (8 cores, 3.2 GHz)",
      "ram": "64 GB DDR4",
      "disks": "2 x 960 GB NVMe SSD",
      "port_speed": "1 Gbps",
      "traffic": "50 TB",
      "currency": "USD",
      "prices": [
        { "cycle": "monthly", "price": "129.00", "setup": "0.00" },
        { "cycle": "annually", "price": "1393.20", "setup": "0.00" }
      ],
      "os": [
        { "id": "os_31", "name": "Ubuntu 24.04" },
        { "id": "os_32", "name": "Debian 12" }
      ],
      "stock": "5+",
      "as_of": "2026-11-15T09:30:00Z"
    }
  ]
}
```

## Get one offer

`GET /offers/{id}` returns one offer of the same list. An offer that is not on your list now (sold out, withdrawn, or never offered to you) is `404 not_found`.

```bash
curl -sS https://api.redswitches.com/v1/offers/ofr_12 \
  -H "Authorization: Bearer $REDSWITCHES_API_KEY"
```

```ts
const offer = await rs.offers.get("ofr_12");
```

```python
offer = client.offers.get("ofr_12")
```

```go
offer, err := client.Offers.Get(ctx, "ofr_12")
```

```json
{
  "id": "ofr_12",
  "name": "Instant Dedicated Server E-2388G",
  "location": { "city": "Amsterdam", "country": "NL" },
  "cpu": "Intel Xeon E-2388G (8 cores, 3.2 GHz)",
  "ram": "64 GB DDR4",
  "disks": "2 x 960 GB NVMe SSD",
  "port_speed": "1 Gbps",
  "traffic": "50 TB",
  "currency": "USD",
  "prices": [{ "cycle": "monthly", "price": "129.00", "setup": "0.00" }],
  "os": [{ "id": "os_31", "name": "Ubuntu 24.04" }],
  "stock": 3,
  "as_of": "2026-11-15T09:30:00Z"
}
```

## Fields

| Field | Type | Meaning |
|---|---|---|
| `id` | string | The offer id, `ofr_<n>`. Use it as `offer_id` when ordering. |
| `name` | string | The product name, as the client area shows it. |
| `location` | object or null | `city`, and `country` as a two-letter code (or null). |
| `cpu` | string or null | The CPU model. Null when unknown. |
| `ram`, `disks`, `port_speed`, `traffic` | string or null | The specs as the client area words them. |
| `currency` | string | Your account's currency. |
| `prices` | array | One entry per billing cycle: `cycle` (`monthly`, `quarterly`, `semiannually`, `annually`, `biennially` or `triennially`), `price` and `setup` as decimal strings. |
| `os` | array | The operating systems you can choose: `id` (`os_<n>`) and `name`. Use the `id` as `os_id` when ordering. |
| `stock` | number or string | `1` to `4`, or `"5+"`. The exact count above five is not shown. |
| `as_of` | string | When this list was read (UTC). |

## Prices

- Prices are for the default configuration, per billing cycle, **before tax**, in your account's currency.
- `setup` is the one-time fee for that cycle.
- Orders through the API are monthly only. The other cycles are shown for comparison.
- The order total you pay includes tax and setup. Get the exact figure with a [dry run](guide-ordering.md) before you order.

## Freshness

The list is rebuilt at most every 30 seconds. Stock can change between reading an offer and ordering it: an order then answers `409 sold_out` and nothing is charged.
