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

# 更新您的活动日志

> PATCH /campaign/user-log/{id}/

在 **Management API** 主机（`api.scanova.io`）上更新单条 G2 评价活动日志记录，使用您的原始 Management API 密钥进行身份验证。

```
PUT   https://api.scanova.io/campaign/user-log/{id}/
PATCH https://api.scanova.io/campaign/user-log/{id}/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField path="id" type="integer" required>
  日志记录的 `id`，来自 [`POST /campaign/user-log/`](/zh/api-reference/management-api/campaign/user-log-create) 或 [`GET /campaign/active/user-log/`](/zh/api-reference/management-api/campaign/user-log-status)。
</ParamField>

同时支持 `PUT`（完整替换）和 `PATCH`（部分更新），二者接受的字段与[记录弹窗已展示、已关闭或已提交](/zh/api-reference/management-api/campaign/user-log-create)中记录的一致，但不包含 `g2_campaign`——您要更新的是哪条记录由 URL 中的 `id` 固定，创建后无法将其转移到另一个活动。

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.scanova.io/campaign/user-log/118/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
    -H "Content-Type: application/json" \
    -d '{ "last_dismissed": "2026-08-21T09:02:00Z" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 118,
    "last_shown": "2026-08-20T10:15:00Z",
    "last_dismissed": "2026-08-21T09:02:00Z",
    "last_submitted": null,
    "is_popup_disabled": false
  }
  ```
</ResponseExample>

## 无法在此设置 `is_popup_disabled`

`is_popup_disabled` 出现在该资源的每个响应中，但在此序列化器中是只读的——即使在请求体中发送它（无论通过 `PUT` 还是 `PATCH`），也会被静默忽略，尽管它确实是底层模型的一个真实字段。目前没有任何已记录的 Management API 端点可以切换它;它是在内部设置的。

## 作用范围与错误

仅限于发起请求的账户所拥有的日志记录——属于其他账户的 `id` 会返回 `404` 而非 `403`，因此无法利用此端点探测其他账户日志记录的存在。

## 相关内容

* [记录弹窗已展示、已关闭或已提交](/zh/api-reference/management-api/campaign/user-log-create)——创建此端点所更新的记录。
* [获取您对当前活动的关闭状态](/zh/api-reference/management-api/campaign/user-log-status)——读取此记录的当前状态。
* [获取当前有效的评价活动](/zh/api-reference/management-api/campaign/active)——此日志记录所对应的活动。
* [Management API 概览](/zh/api-reference/management-api/overview)——适用于此端点的身份验证方案和配额规则。


## OpenAPI

````yaml api-reference/openapi/management-api.json PATCH /campaign/user-log/{id}/
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/user-log/{id}/:
    patch:
      summary: Update your campaign log (partial update)
      description: >-
        Scoped to log rows owned by the requesting account — `id` values
        belonging to another account return 404, not 403. `is_popup_disabled` is
        read-only on this serializer and can't be set through either PATCH or
        PUT despite appearing as a model field.
      operationId: partialUpdateManagedCampaignUserLog
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                last_shown:
                  type: string
                  format: date-time
                last_dismissed:
                  type: string
                  format: date-time
                last_submitted:
                  type: string
                  format: date-time
            example:
              last_dismissed: '2026-08-21T09:02:00Z'
      responses:
        '200':
          description: Log row updated.
          content:
            application/json:
              example:
                id: 118
                last_shown: '2026-08-20T10:15:00Z'
                last_dismissed: '2026-08-21T09:02:00Z'
                last_submitted: null
                is_popup_disabled: false
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.

````