---
title: "Preview the price of changes"
url: https://docs.corefinity.com/api/reference/billing/preview-billing-quote
type: endpoint
last_updated: 2026-11-13
feature: billing
related:
  - https://docs.corefinity.com/guides/billing/billing-overview.md
  - https://docs.corefinity.com/mcp/tools/corestack_billing_quote_preview.md
---
# Preview the price of changes

Prices up to ten changes against the billing account and answers what each costs a month, the monthly total
before and after, the amount for the rest of this month and its VAT; nothing is changed and nothing is
charged. Send the quote's `id` as `quote_id` with the change itself (a package, add-on or server type change)
until `expires_at`, 15 minutes later, to make it at the price you were shown. A quote is for the company's
owner and its billing contacts.

```http
POST /api/corestack/billing/quote
```

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

## Query parameters

- `account` (integer): The billing account to read, by its `id` (see `GET /corestack/billing/account`). Left out, the request acts on your company's default billing account. An account that does not exist and one that is not your company's answer the same 404.
- `account_id` (integer): The same as `account`, under the name the MCP tools use. Send one of the two: when they name different accounts the request is refused `422 invalid` on `account_id`.

## Body

- `account` (integer): The billing account to price against, by its `id`. Left out, your company's default one. `account_id` is taken as the same field.
- `changes` (array of objects, required)
  - `addons` (object): For `new_site` and `new_cluster`, the add-ons to price with it.
    - `cores` (integer)
    - `disk_gb` (integer): Extra disk in GB, 102400 (100 TB) at most.
    - `memory_gb` (integer)
  - `cores` (integer)
  - `disk_gb` (integer): Extra disk in GB, 102400 (100 TB) at most.
  - `environments` (array of objects): For `new_site`, the staging environments to price with it.
    - `uat_size` (string, required)
  - `family` (string): The server type. `general` is Standard and `optimised` is Performance. One of `general`, `optimised`.
  - `log_storage_gb` (integer)
  - `memory_gb` (integer)
  - `package` (string): A package code, such as `CC12`.
  - `region` (string)
  - `subject` (object): What is changed. A `package`, `addons` or `compute_family` change is for a site or a CoreCluster; a `uat_size` change is for an environment.
    - `id` (integer, required)
    - `type` (string, required) One of `site`, `cluster`, `environment`.
  - `type` (string, required) One of `package`, `addons`, `uat_size`, `compute_family`, `new_site`, `new_cluster`.
  - `uat_size` (string): A staging environment size, such as `small`.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/billing/quote \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "changes": [
      {
        "family": "general",
        "package": "CC8",
        "region": "uk",
        "type": "new_cluster"
      }
    ]
  }'
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/billing/quote', [
        'changes' => [
            [
                'family' => 'general',
                'package' => 'CC8',
                'region' => 'uk',
                'type' => 'new_cluster',
            ],
        ],
    ]);

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/billing/quote', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    changes: [
      {
        family: 'general',
        package: 'CC8',
        region: 'uk',
        type: 'new_cluster',
      },
    ],
  }),
});

// 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/billing/quote",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "changes": [
            {
                "family": "general",
                "package": "CC8",
                "region": "uk",
                "type": "new_cluster",
            },
        ],
    },
)

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

## Responses

### 200 The quote.

```json
{
  "applies": "now",
  "currency": "GBP",
  "effective_from": "2027-01-18T11:00:00Z",
  "expires_at": "2027-01-18T10:30:00Z",
  "id": "c798dc86-3497-421e-a481-91bac3c92fd9",
  "lines": [
    {
      "after": {
        "amount": "900.00",
        "currency": "GBP"
      },
      "before": {
        "amount": "600.00",
        "currency": "GBP"
      },
      "delta": {
        "amount": "300.00",
        "currency": "GBP"
      },
      "key": "package",
      "label": "Package: CC8 → CC12"
    }
  ],
  "monthly_after": {
    "amount": "900.00",
    "currency": "GBP"
  },
  "monthly_before": {
    "amount": "600.00",
    "currency": "GBP"
  },
  "monthly_delta": {
    "amount": "300.00",
    "currency": "GBP"
  },
  "prorata": {
    "amount": {
      "amount": "131.05",
      "currency": "GBP"
    },
    "from": "2027-01-18T11:00:00Z",
    "hours": 325,
    "to": "2027-02-01T00:00:00Z"
  },
  "tax": {
    "amount": {
      "amount": "60.00",
      "currency": "GBP"
    },
    "kind": "standard",
    "note": "UK VAT 20 %",
    "rate_percent": 20
  },
  "trial": null
}
```

### 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), your company requires two-factor authentication and you have not set it up (`two_factor_required`), or you may not read your company's billing (`billing_forbidden`): billing is for the company's owner, its billing contacts and its primary user.

```json
{
  "code": "billing_forbidden",
  "message": "Billing is available to your company's owner and billing contacts.",
  "reason": "billing_forbidden"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

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

### 409 The change cannot be priced as asked. `same_package`: the subject is on that package already. `downgrade`: the package is smaller than the one it is on. `same_family`: it is on that server type already. `contract_missing`: the subject has no billing contract in the Control Panel, so there is nothing to price it against; the change can be made without a quote. A `uat_size` change for an environment that has just been moved is refused `billing_settling` while its billing is brought up to date, and `billing_moved_away` for the environment the move left behind.

```json
{
  "code": "billing_settling",
  "message": "This environment has just been moved and its billing is still being updated. Try again in a few minutes.",
  "reason": "billing_settling"
}
```

### 422 `invalid`: a field is missing or wrong, or a change lacks a field its `type` needs; `field` names it, a change's field by its row (`changes.0.subject`). The catalogue's own refusals name what is not sold: `package_unknown`, `package_inactive`, `package_platform` (the package cannot run the site's platform), `zone_unknown`, `currency_unpublished`, `family_unavailable` (the server type is not offered there), `uat_unknown` (not a staging environment size) and `duplicate_change` (two changes of one type for one subject).

```json
{
  "code": "invalid",
  "errors": {
    "changes.0.disk_gb": [
      "The changes.0.disk_gb may not be greater than 102400."
    ]
  },
  "field": "changes.0.disk_gb",
  "message": "The changes.0.disk_gb may not be greater than 102400.",
  "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 | `billing_forbidden` | Billing is for the organisation's owner and billing contacts. Ask one of them to do this. |
| 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. |
| 409 | `billing_settling` | This environment has just been moved and its billing is still being updated. Try again in a few minutes. |
| 409 | `contract_missing` | There is no billing contract to price this against. Ask support to set up billing, or make the change without a quote where that is offered. |
| 409 | `downgrade` | A smaller package cannot be chosen here. Choose a larger one; downgrades are arranged with support. |
| 409 | `same_family` | This is already the server type. Choose a different one. |
| 409 | `same_package` | This is already the package. Choose a different one. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 422 | `package_unknown` | That is not a package Corefinity sells for this. Choose one from the catalogue. |
| 422 | `zone_unknown` | That is not a region. Choose uk, us, nl or aus. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Billing](https://docs.corefinity.com/guides/billing/billing-overview.md)
- MCP tool: [`corestack_billing_quote_preview`](https://docs.corefinity.com/mcp/tools/corestack_billing_quote_preview.md)
