> ## 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 /campaign/active/

在 **Management API** 主机（`api.scanova.io`）上返回当前有效的 G2 评价活动，使用您的原始 Management API 密钥进行身份验证——如果您还没有设置好密钥，请参见[概览](/zh/api-reference/management-api/overview)。

```
GET https://api.scanova.io/campaign/active/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

Scanova 会定期开展活动，鼓励满意的客户在 G2 上留下评价。此端点返回活动内容——`title`、`button_label`、`link`，以及活动生效的日期区间——以便集成方在需要时展示与 Scanova 控制台相同的提示。

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.scanova.io/campaign/active/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 4,
    "name": "g2-q3-push",
    "start_date": "2026-07-01",
    "end_date": "2026-09-30",
    "title": "Enjoying Scanova? Leave us a review on G2",
    "button_label": "Write a review",
    "link": "https://www.g2.com/products/scanova/reviews",
    "is_active": true,
    "plans": [12, 14, 27]
  }
  ```
</ResponseExample>

## 没有正在进行的活动

并非始终都有活动在进行。此处返回 `404` 恰恰意味着这一点——当前没有需要展示的内容，这并非错误。`plans` 是该活动所针对的方案 ID 列表；不在该列表中的方案在 Scanova 控制台中不会看到此活动，不过此端点本身并不会根据调用密钥所属的方案进行过滤。

## 相关内容

* [获取您对当前活动的关闭状态](/zh/api-reference/management-api/campaign/user-log-status)——该账户是否已经关闭过它。
* [记录弹窗已展示、已关闭或已提交](/zh/api-reference/management-api/campaign/user-log-create)——记录与其的一次互动。
* [Management API 概览](/zh/api-reference/management-api/overview)——适用于此端点的身份验证方案和配额规则。


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /campaign/active/
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:
  /campaign/active/:
    get:
      summary: Get the active review campaign
      description: >-
        Returns the currently active G2 review-prompt campaign, if any — the
        banner text, button label, and link a client would render. Returns 404
        when no campaign is currently active; treat that as "show nothing", not
        an error.
      operationId: getManagedActiveCampaign
      responses:
        '200':
          description: The active campaign.
          content:
            application/json:
              example:
                id: 4
                name: g2-q3-push
                start_date: '2026-07-01'
                end_date: '2026-09-30'
                title: Enjoying Scanova? Leave us a review on G2
                button_label: Write a review
                link: https://www.g2.com/products/scanova/reviews
                is_active: true
                plans:
                  - 12
                  - 14
                  - 27
        '404':
          description: No campaign is currently active.
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.

````