> ## 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` (أو `MANAGEMENT_API_SANDBOX`)، يُرسل كقيمة خام لترويسة `Authorization` — راجع [نظرة عامة على Management API](/ar/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">
  طريقة الدفع المسجّلة للحساب، أو `null` إذا لم تُحدَّد أي طريقة (مثل الحسابات المزوَّدة عبر Free Trial أو Enterprise).
</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 وتحصل على `401` مع الرسالة `"Your plan does not have management API quota."`، تحقق من `plan.quotas` هنا بحثًا عن `MANAGEMENT_API` (أو `MANAGEMENT_API_SANDBOX`)، وتواصل مع الدعم إذا كنت تعتقد أن خطتك ينبغي أن تتضمنها — لا يوجد مسار ترقية ذاتية الخدمة لهذه الحصة تحديدًا في الوقت الحالي.
</Note>

## ذات صلة

* [نظرة عامة على Management API](/ar/api-reference/management-api/overview) — تخطيط `environment` إلى الحصة (`MANAGEMENT_API`، `INTEGRATION_ZAPIER`، `INTEGRATION_MCP`) الذي تقابله رموز `plan.quotas` الخاصة بنقطة النهاية هذه.
* [إنشاء رمز API](/ar/api-reference/management-api/tokens/create) — حيث تحدد `environment` الخاصة بالمفتاح أي هذه الحصص يُفحص.
* [تصدير التحليلات](/ar/api-reference/management-api/analytics/export) — نقطة نهاية محكومة برمز `EXPORT_ANALYTICS_REPORT` يمكنك التحقق منه هنا.
* [إدارة المجلدات](/ar/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.

````