CorefinityCorefinityDocs
Open the Control PanelControl Panel
Orders · 1 of 2

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.

POST/api/corestack/order-links/preview

Body

addonsobject

Upgrades on top of the package, in whole units. A kind that is left out is 0.

Fields
coresinteger

Extra cores. At least 0.

disk_gbinteger

Extra disk, in GB. At least 0.

memory_gbinteger

Extra memory, in GB. At least 0.

billingstring

The billing period the link opens with. The quote's figures are monthly either way. Defaults to monthly.

monthlyannual
compute_familystring

The server type. general is Standard and optimised is Performance, which is refused where the region does not offer it. Defaults to general.

generaloptimised
currencystringRequired

The currency to price in. A currency the order page has no prices in at the moment is refused.

GBPUSDEUR
packagestringRequired

A package code the order page sells, such as CS4 or CC8. Its first two letters name the line (CS CoreStack, CC CoreCluster).

platformstring

The platform of a CoreStack site, such as wordpress. Needed for a CoreStack package and ignored for a CoreCluster one.

regionstringRequired

A region the order page offers to everyone, such as uk, us, nl or aus. The package's line must be orderable there.

Returns

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

Fields of the 200 answer
addon_stepsobjectRequired

The increment and ceiling of each upgrade for this package.

Fields
coresobjectRequired
Fields
maxintegerRequired

The most the package takes.

stepintegerRequired

The increment the order page takes.

disk_gbobjectRequired
Fields
maxintegerRequired

The most the package takes.

stepintegerRequired

The increment the order page takes.

memory_gbobjectRequired
Fields
maxintegerRequired

The most the package takes.

stepintegerRequired

The increment the order page takes.

quoteobjectRequired

What the order page's own summary shows before anything is saved.

Fields
currencystringRequired
linesarray of objectsRequired
Fields of each item
keystringRequired

What the line is, such as package, addon_cores, addon_memory_gb or addon_disk_gb.

labelstringRequired
monthlystringRequired

The line's monthly price, a decimal number as text.

quantityinteger

How many units, on an upgrade's line.

unitstring

The monthly price of one unit, on an upgrade's line.

subtotal_monthlystringRequired

The sum of the lines, a decimal number as text.

vatstringRequired

The prices exclude VAT.

specobjectRequired

The configuration as it was checked.

Fields
addonsobjectRequired
Fields
coresintegerRequired
disk_gbintegerRequired
memory_gbintegerRequired
billingstringRequired
monthlyannual
compute_familystringRequired
generaloptimised
currencystringRequired
packagestringRequired
platformstring or nullRequired

The platform of a CoreStack site; null for a CoreCluster.

product_linestringRequired

cs is CoreStack and cc is CoreCluster.

cscc
regionstringRequired
urlstringRequired

The order page's address with every choice in spec already made. Choices left at their default are not written into it.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

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"
  }'
{
  "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"
}
Try it
Held in this tab's memory only. Never stored or sent to us.

This sends a real POST request and changes your account.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT