---
title: "Preview an order link"
url: https://docs.corefinity.com/api/reference/billing/preview-order-link
type: endpoint
last_updated: 2026-11-13
feature: order
related:
  - https://docs.corefinity.com/guides/billing/orders.md
---
# Preview an order link

Checks a configuration for the order page, prices it as the order page does (monthly, excluding VAT) and
answers the link that opens the order page with every choice made. Nothing is created, saved or charged, and
the answer is the same for everyone who is signed in.

```http
POST /api/corestack/order-links/preview
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 60 a minute
- Try it in the console: on

## Body

- `addons` (object): Upgrades on top of the package, in whole units. A kind that is left out is 0.
  - `cores` (integer): Extra cores.
  - `disk_gb` (integer): Extra disk, in GB.
  - `memory_gb` (integer): Extra memory, in GB.
- `billing` (string): The billing period the link opens with. The quote's figures are monthly either way. One of `monthly`, `annual`. Defaults to `monthly`.
- `compute_family` (string): The server type. `general` is Standard and `optimised` is Performance, which is refused where the region does not offer it. One of `general`, `optimised`. Defaults to `general`.
- `currency` (string, required): The currency to price in. A currency the order page has no prices in at the moment is refused. One of `GBP`, `USD`, `EUR`.
- `package` (string, required): A package code the order page sells, such as `CS4` or `CC8`. Its first two letters name the line (`CS` CoreStack, `CC` CoreCluster).
- `platform` (string): The platform of a CoreStack site, such as `wordpress`. Needed for a CoreStack package and ignored for a CoreCluster one.
- `region` (string, required): A region the order page offers to everyone, such as `uk`, `us`, `nl` or `aus`. The package's line must be orderable there.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/order-links/preview \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "addons": {
      "cores": 2,
      "disk_gb": 50,
      "memory_gb": 8
    },
    "compute_family": "optimised",
    "currency": "GBP",
    "package": "CC8",
    "region": "uk"
  }'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/order-links/preview', [
        'addons' => [
            'cores' => 2,
            'disk_gb' => 50,
            'memory_gb' => 8,
        ],
        'compute_family' => 'optimised',
        'currency' => 'GBP',
        'package' => 'CC8',
        'region' => 'uk',
    ]);

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/order-links/preview', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    addons: {
      cores: 2,
      disk_gb: 50,
      memory_gb: 8,
    },
    compute_family: 'optimised',
    currency: 'GBP',
    package: 'CC8',
    region: 'uk',
  }),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.post(
    "https://manage.corefinity.com/api/corestack/order-links/preview",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "addons": {
            "cores": 2,
            "disk_gb": 50,
            "memory_gb": 8,
        },
        "compute_family": "optimised",
        "currency": "GBP",
        "package": "CC8",
        "region": "uk",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The configuration as it was checked, its price, and the link that opens the order page with it.

```json
{
  "addon_steps": {
    "cores": {
      "max": 8,
      "step": 1
    },
    "disk_gb": {
      "max": 102400,
      "step": 10
    },
    "memory_gb": {
      "max": 32,
      "step": 1
    }
  },
  "quote": {
    "currency": "GBP",
    "lines": [
      {
        "key": "package",
        "label": "CoreCluster CC8",
        "monthly": "720.00"
      },
      {
        "key": "addon_cores",
        "label": "2 extra cores",
        "monthly": "108.00",
        "quantity": 2,
        "unit": "54.00"
      },
      {
        "key": "addon_memory_gb",
        "label": "8 GB extra memory",
        "monthly": "48.00",
        "quantity": 8,
        "unit": "6.00"
      },
      {
        "key": "addon_disk_gb",
        "label": "50 GB extra disk",
        "monthly": "12.00",
        "quantity": 50,
        "unit": "0.24"
      }
    ],
    "subtotal_monthly": "888.00",
    "vat": "excluded"
  },
  "spec": {
    "addons": {
      "cores": 2,
      "disk_gb": 50,
      "memory_gb": 8
    },
    "billing": "monthly",
    "compute_family": "optimised",
    "currency": "GBP",
    "package": "CC8",
    "platform": null,
    "product_line": "cc",
    "region": "uk"
  },
  "url": "https://manage.corefinity.com/order?package=CC8&region=uk&currency=GBP&optimised=1&addon_cores=2&addon_memory_gb=8&addon_disk_gb=50"
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your company requires two-factor authentication and you have not set it up. For routes outside Managed Clusters.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The feature is not on for your company.

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 422 The order page would not take a value (`invalid`). `errors` lists every refused field in the order page's own words and `field` names the first: `package`, `region`, `currency`, `compute_family`, `platform`, `billing`, `addons`, or an upgrade by its own name (`cores`, `memory_gb`, `disk_gb`). The ceilings in an upgrade's sentence are the package's own.

```json
{
  "code": "invalid",
  "errors": {
    "addons": [
      "Send the upgrades as an object of whole numbers"
    ]
  },
  "field": "addons",
  "message": "Send the upgrades as an object of whole numbers",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Orders](https://docs.corefinity.com/guides/billing/orders.md)
