> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Auswirkung eines Tarif-Downgrades prüfen

> GET /plans/downgrade-impact/

Zeigt vorab, welche Ressourcen ein Downgrade blockieren würden, bevor Sie zur Kasse gehen, auf dem **Management-API**-Host (`api.scanova.io`), authentifiziert mit Ihrem rohen Management-API-Schlüssel.

```
GET https://api.scanova.io/plans/downgrade-impact/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField query="target_plan" type="string" required>
  Der Slug des Zieltarifs (aus dem `slug`-Feld von [Verfügbare Tarife auflisten](/de/api-reference/management-api/plans/available)).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.scanova.io/plans/downgrade-impact/?target_plan=starter-scanova-io" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "violations": [
      {
        "codename": "TOTAL_QR_CODES",
        "quota_name": "Total QR Codes",
        "exceed_value": 12,
        "resolvable": true,
        "total_affected_count": 112,
        "affected_resources": ["Q07afe81aa0034c01", "Q19bd72cc1145d02"]
      }
    ],
    "current_plan_expiry": "2027-08-16",
    "days_remaining": 365
  }
  ```
</ResponseExample>

Ein leeres `violations`-Array bedeutet, dass das Downgrade derzeit unproblematisch ist — nichts müsste vorher geändert werden. Dies ist vollständig schreibgeschützt und ändert nichts; es verwendet exakt dieselbe Regel-Engine, die auch der echte Checkout durchsetzt, kann also nicht von dem abweichen, was bei einem tatsächlichen Downgrade passiert.

### Antwortfelder

<ResponseField name="violations" type="array">
  Ein Eintrag pro Quota, die der Zieltarif angesichts der aktuellen Nutzung des Kontos nicht abdecken kann.

  <Expandable title="Eigenschaften von violation">
    <ResponseField name="codename" type="string">Der stabile Bezeichner der Quota (z. B. `TOTAL_QR_CODES`, `SHARED_USERS`).</ResponseField>
    <ResponseField name="quota_name" type="string">Menschenlesbarer Quota-Name.</ResponseField>
    <ResponseField name="exceed_value" type="integer">Wie weit das Konto derzeit über dem Limit des Zieltarifs liegt.</ResponseField>
    <ResponseField name="resolvable" type="boolean">Ob das Konto dies selbst lösen kann (z. B. durch Löschen/Deaktivieren einiger Ressourcen), bevor es downgradet.</ResponseField>
    <ResponseField name="total_affected_count" type="integer">Gesamtzahl der auf diese Quota angerechneten Ressourcen.</ResponseField>
    <ResponseField name="affected_resources" type="array">Bezeichner der konkreten gezählten Ressourcen (z. B. QR-`qrid`-Werte) — kann bei hohen Zahlen eine gekürzte Stichprobe sein.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="current_plan_expiry" type="string">
  Das Ablaufdatum des aktuellen Tarifs, oder `null` bei einem Tarif ohne Ablaufdatum.
</ResponseField>

<ResponseField name="days_remaining" type="integer | null">
  Verbleibende Tage bis `current_plan_expiry`, oder `null`, wenn der Tarif kein Ablaufdatum hat.
</ResponseField>

`400`, wenn `target_plan` fehlt.

## Siehe auch

* [Verfügbare Tarife auflisten](/de/api-reference/management-api/plans/available) — einen `slug` finden, für den ein Downgrade geprüft werden soll.
* [Aktueller Tarif](/de/api-reference/management-api/plans/current) — der aktuelle Tarif und die Quota-Zuweisungen des Kontos.
* [Management-API-Übersicht](/de/api-reference/management-api/overview) — das Auth-Schema und die Quota-Regeln, die für diesen Endpunkt gelten.


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /plans/downgrade-impact/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /plans/downgrade-impact/:
    get:
      summary: Preview a plan downgrade's impact
      description: >-
        Read-only preview of which specific resources (e.g. QR codes over a new
        lower limit, shared users beyond a new seat count) would block a
        downgrade to `target_plan`, before committing to checkout. Reuses the
        exact same violation-detection logic real checkout enforces, so this
        preview can never disagree with what actually happens at order creation.
      operationId: getManagedDowngradeImpact
      parameters:
        - name: target_plan
          in: query
          required: true
          schema:
            type: string
          description: The target plan's slug.
      responses:
        '200':
          description: >-
            Violations that would block the downgrade (empty array if none),
            plus the current plan's remaining time.
          content:
            application/json:
              example:
                violations:
                  - codename: TOTAL_QR_CODES
                    quota_name: Total QR Codes
                    exceed_value: 12
                    resolvable: true
                    total_affected_count: 112
                    affected_resources:
                      - Q07afe81aa0034c01
                      - Q19bd72cc1145d02
                current_plan_expiry: '2027-08-16'
                days_remaining: 365
        '400':
          description: Missing `target_plan` query parameter.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````