CorefinityCorefinityDocs
Open the Control PanelControl Panel
Billing · 5 of 16

List the contract lines

Answers every line the account is billed for now: each package, add-on and staging environment, with its contract, what it is for, its monthly and hourly price and since when it runs. A contract opened for a new site or CoreCluster bills nothing until that site or CoreCluster is ready, which contract.billing_starts says. The list is not paged.

GET/api/corestack/billing/contracts

Query parameters

accountinteger

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. At least 1.

account_idinteger

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. At least 1.

Returns

200 The contract lines.

Fields of the 200 answer

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403billing_forbiddenBilling is for the organisation's owner and billing contacts. Ask one of them to do this.
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 https://manage.corefinity.com/api/corestack/billing/contracts \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
[
  {
    "contract": {
      "billing_model": "metered",
      "billing_period": "monthly",
      "billing_starts": "started",
      "billing_starts_at": "2026-11-01T01:00:00Z",
      "billing_starts_note": null,
      "first_billed_at": "2027-01-01T00:00:00Z",
      "id": 5120,
      "money_back": null,
      "reference": "MC-1180-1",
      "starts_on": "2026-11-01",
      "status": "active",
      "trial_ends_at": null
    },
    "hourly": {
      "amount": "0.806452",
      "currency": "GBP"
    },
    "id": 9001,
    "kind": "package",
    "label": "CC8 · Northwind UK 1",
    "modifiers": [],
    "monthly": {
      "amount": "600.00",
      "currency": "GBP"
    },
    "product": {
      "line": "cc",
      "region": "United Kingdom",
      "server_type": "Standard"
    },
    "quantity": 1,
    "since": "2026-11-01T01:00:00Z",
    "subject": {
      "href": "/managed-clusters/clusters/1017",
      "ref": {
        "id": 1017,
        "name": "Northwind UK 1"
      },
      "type": "cluster"
    },
    "unit": null,
    "until": null
  }
]
Try it
Held in this tab's memory only. Never stored or sent to us.

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

Was this helpful?
Open in ClaudeOpen in ChatGPT