Skip to content

List billing cycle prices

GET/billing/managed-services/{service}/billing-cycle

Overview

Lists available billing cycles and the price for each. Each price is the service's current price scaled to the cycle's length: a service at 10.00 a month costs 120.00 a year. is_current identifies the current cycle.

If prices_known is false, the service has no recurring price to scale from and every price is null. Its cycle cannot be changed through the API.

Permissions

Requires the billing.read (View billing) permission for the selected team. Resources outside that team return 404.

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/managed-services/{service}/billing-cycle' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "items": [
    {
      "billing_cycle": "monthly",
      "cycle_label": "Monthly",
      "months": 1,
      "price": "12.00",
      "is_current": true
    },
    {
      "billing_cycle": "quarterly",
      "cycle_label": "Quarterly",
      "months": 3,
      "price": "36.00",
      "is_current": false
    },
    {
      "billing_cycle": "semiannually",
      "cycle_label": "Semi-annually",
      "months": 6,
      "price": "72.00",
      "is_current": false
    },
    {
      "billing_cycle": "annually",
      "cycle_label": "Yearly",
      "months": 12,
      "price": "144.00",
      "is_current": false
    }
  ],
  "currency": "USD",
  "prices_known": true
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Path parameters

servicestringrequired

The service ID returned by the billing endpoints.

Response 200

application/json

The record, as a JSON object. There is no envelope.

itemsobject[]required

Billing cycles and their invoice amounts.

Show child attributes
billing_cyclestringrequired

The term, spelled the way the cycle change endpoint expects it.

cycle_labelstringrequired

A readable name for the billing cycle.

monthsintegerrequired

How many months of service the term buys.

pricestring | nullrequired

What the service would be invoiced each time on this term, in the currency beside the list.

is_currentbooleanrequired

Whether this is the term the service is billed on today.

currencystring | nullrequired

The three-letter currency code the prices are in, or null where the account has none.

prices_knownbooleanrequired

Whether the service has a recurring price to scale. False leaves every price null.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
404
The resource was not found in the selected team. Resources in another account or team also return 404.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.