> ## 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.

# 当前套餐

> GET /plans/current/

返回已通过身份验证的账户的当前有效订阅套餐——其到期时间、账单状态，以及该套餐授予的完整配额/权限集合。

<Note>
  需要一个拥有 `MANAGEMENT_API`（或 `MANAGEMENT_API_SANDBOX`）配额的 Management API 密钥，以原始 `Authorization` 请求头的值发送——参见 [Management API 概览](/zh/api-reference/management-api/overview)。
</Note>

## 请求

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://management.scanova.io/plans/current/' \
    --header 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "is_active": true,
    "is_free": false,
    "expire": "2027-08-16",
    "is_expired": false,
    "days_left": 365,
    "recurring_enabled": false,
    "can_cancel_subscription": false,
    "payment_method": null,
    "pricing": null,
    "plan": {
      "id": 275,
      "slug": "pro-scanova-io",
      "name": "Pro - scanova.io",
      "plan_type": "Normal",
      "description": "...",
      "version": 1,
      "family": {
        "id": 12,
        "name": "Pro"
      },
      "quotas": [
        {
          "quota_id": 401,
          "codename": "QR_CODE_LIMIT",
          "name": "QR Code Limit",
          "value": 100
        }
      ],
      "is_enterprise_plan": false,
      "is_custom_plan": false
    },
    "upcoming_plan": null
  }
  ```
</ResponseExample>

已针对一个 Pro 套餐测试账户完成线上核实——该账户的 `pricing` 和 `payment_method` 均为 `null`，因为它目前并非处于付费的循环账单周期中；`plan.quotas` 在上方为求简洁而做了截断（真实响应会包含该套餐授予的每一项配额）。

### 响应字段

<ResponseField name="is_active" type="boolean">
  套餐当前是否处于有效状态（未过期、未取消）。
</ResponseField>

<ResponseField name="is_free" type="boolean">
  是否为免费层级套餐。
</ResponseField>

<ResponseField name="expire" type="string">
  到期日期（`YYYY-MM-DD`），对于没有到期时间的套餐，则为字面字符串 `"Lifetime"`。
</ResponseField>

<ResponseField name="is_expired" type="boolean">
  该套餐是否已经过期。
</ResponseField>

<ResponseField name="days_left" type="integer">
  距离 `expire` 剩余的天数。
</ResponseField>

<ResponseField name="recurring_enabled" type="boolean">
  是否开启了自动续订。
</ResponseField>

<ResponseField name="can_cancel_subscription" type="boolean">
  该账户是否有资格从仪表盘取消其订阅。
</ResponseField>

<ResponseField name="payment_method" type="object | null">
  账户上存档的付款方式，如果未设置任何付款方式（例如 Free Trial/Enterprise 预配置账户），则为 `null`。
</ResponseField>

<ResponseField name="pricing" type="object | null">
  购买此套餐时所依据的具体定价/账单周期记录（`{id, name, period}`，如果能从订单历史中解析出来，还会附带 `amount`/`currency`），如果账户在此套餐下没有任何账单历史，则为 `null`。
</ResponseField>

<ResponseField name="plan" type="object">
  套餐定义本身。

  <Expandable title="plan 属性">
    <ResponseField name="id" type="integer" />

    <ResponseField name="slug" type="string" />

    <ResponseField name="name" type="string" />

    <ResponseField name="plan_type" type="string">人类可读的套餐类型，例如 `Normal`、`Enterprise`。</ResponseField>

    <ResponseField name="description" type="string" />

    <ResponseField name="version" type="integer" />

    <ResponseField name="family" type="object">`{id, name}`——此套餐所属的套餐系列（例如"Pro"的所有档位）。</ResponseField>
    <ResponseField name="quotas" type="array">此套餐授予的每一项配额，各自以 `{quota_id, codename, name, value, ...}` 形式呈现。`codename` 是其他端点配额门槛错误消息中所引用的稳定标识符（例如 `MANAGEMENT_API`、`FOLDER_MANAGEMENT`、`EXPORT_ANALYTICS_REPORT`）。</ResponseField>

    <ResponseField name="is_enterprise_plan" type="boolean" />

    <ResponseField name="is_custom_plan" type="boolean" />
  </Expandable>
</ResponseField>

<ResponseField name="upcoming_plan" type="object | null">
  如果账户有一个计划中的套餐变更（例如在当前账单周期结束时生效的降级），则形状与 `plan` 相同——否则为 `null`。
</ResponseField>

<Note>
  标准 Pro 套餐**不**授予 `MANAGEMENT_API` 配额——在已核实的测试环境中，只有 Free Trial、Enterprise 和 Internal 套餐才授予该配额。如果您正在基于此 API 进行开发，并遇到附带 `"Your plan does not have management API quota."` 消息的 `401` 错误，请在此处的 `plan.quotas` 中检查是否有 `MANAGEMENT_API`（或 `MANAGEMENT_API_SANDBOX`）；如果您认为自己的套餐应当包含该配额，请联系支持团队——目前该特定配额没有自助升级路径。
</Note>

## 相关内容

* [Management API 概览](/zh/api-reference/management-api/overview) —— 本端点 `plan.quotas` 中的代号（codename）所对应的 `environment` 到配额映射关系（`MANAGEMENT_API`、`INTEGRATION_ZAPIER`、`INTEGRATION_MCP`）。
* [创建一个 API 令牌](/zh/api-reference/management-api/tokens/create) —— 密钥的 `environment` 在此决定会检查这些配额中的哪一项。
* [导出分析数据](/zh/api-reference/management-api/analytics/export) —— 一个受 `EXPORT_ANALYTICS_REPORT` 代号约束的端点，您可以在此处检查该代号。
* [文件夹管理](/zh/api-reference/management-api/folders/create) —— 一个受 `FOLDER_MANAGEMENT` 代号约束的端点，您可以在此处检查该代号。


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /plans/current/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    management.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://management.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /plans/current/:
    get:
      summary: Get current plan
      operationId: getManagedCurrentPlan
      responses:
        '200':
          description: >-
            Current plan detail — expiry, billing state, and the full
            quota/permission set the plan grants.
          content:
            application/json:
              example:
                is_active: true
                is_free: false
                expire: '2027-08-16'
                is_expired: false
                days_left: 365
                recurring_enabled: false
                can_cancel_subscription: false
                payment_method: null
                pricing: null
                plan:
                  id: 275
                  slug: pro-scanova-io
                  name: Pro - scanova.io
                  plan_type: Normal
                  version: 1
                  family:
                    id: 12
                    name: Pro
                  quotas:
                    - quota_id: 401
                      codename: QR_CODE_LIMIT
                      name: QR Code Limit
                      value: 100
                  is_enterprise_plan: false
                  is_custom_plan: false
                upcoming_plan: null
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. management.scanova.io) — the same key sent to
        the regular API host will not authenticate.

````