Skip to main content

List the contract months of an ai hosting plan

GET/v2/customers/{customerId}/ai-hostings/{planId}/billing-periods/
API version
v2
Request method
GET
Operation ID
ai-hosting-plan-get-billing-periods

Request

  • customerIdstring
    required
  • planIdstring (uuid)
    required

Responses

Format
application/json
Description

The plan's billing periods, oldest first.

  • customerIdstring (uuid)
    required
  • nextTokenResetstring (date-time)

    End of the current period, i.e. when the token counter next resets.

  • periodsarray of object
    required

    Every contract month of the plan from its start up to the current one, anchored on the plan start date rather than the calendar.

    • Array[
      • *object
        • endstring (date-time)
          required
        • isCurrentboolean
          required
        • shortenedByUpgradeboolean
          required

          True when an upgrade cut this period short: the token counter is reset immediately on an upgrade, so the period ends there instead of on the regular grid. A downgrade does not do this - it takes effect at the next regular boundary.

        • startstring (date-time)
          required
        • tokenLimitinteger (≥ 0, int64)
          required

          The limit that applied during this period, which after a tariff change differs from the plan's current limit.

      ]
  • planIdstring (uuid)
    required

Usage examples

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/customers/string/ai-hostings/f0f86186-0a5a-45b2-aa33-502777496347/billing-periods