> ## 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}/

يحدّث سجل حالة واحد لحملة تقييم G2 على مضيف **Management API** (‏`api.scanova.io`)، مصادَقًا عليه بمفتاح 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/`](/ar/api-reference/management-api/campaign/user-log-create) أو [`GET /campaign/active/user-log/`](/ar/api-reference/management-api/campaign/user-log-status).
</ParamField>

تُدعم كل من `PUT` (لاستبدال كامل) و`PATCH` (لتحديث جزئي)، وكلاهما يقبل نفس مجموعة الحقول الموثّقة في [تسجيل أن النافذة المنبثقة قد عُرضت أو أُغلقت أو أُرسلت](/ar/api-reference/management-api/campaign/user-log-create)، باستثناء `g2_campaign` — السجل الذي تُحدّثه محدَّد بواسطة `id` في عنوان URL، وليس شيئًا يمكنك نقله إلى حملة أخرى بعد الإنشاء.

<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` في كل استجابة من هذا المورد، لكنه للقراءة فقط في هذا المُسلسِل (serializer) — إرساله في نص الطلب (عبر `PUT` أو `PATCH`) يُتجاهل بصمت، رغم كونه حقلًا حقيقيًا في النموذج الأساسي. لا يوجد حاليًا أي طرف موثَّق في Management API يبدّل قيمته؛ يُضبط داخليًا فقط.

## النطاق والأخطاء

مقتصر على سجلات الحالة المملوكة للحساب مُقدِّم الطلب — أي `id` يخص حسابًا آخر يعيد `404`، وليس `403`، بحيث لا يمكن استخدام هذا الطرف لاستكشاف وجود سجلات حالة لحسابات أخرى.

## طرق ذات صلة

* [تسجيل أن النافذة المنبثقة قد عُرضت أو أُغلقت أو أُرسلت](/ar/api-reference/management-api/campaign/user-log-create) — ينشئ السجل الذي يحدّثه هذا الطرف.
* [الحصول على حالة الإغلاق الخاصة بك للحملة النشطة](/ar/api-reference/management-api/campaign/user-log-status) — قراءة الحالة الحالية لهذا السجل.
* [الحصول على حملة التقييم النشطة](/ar/api-reference/management-api/campaign/active) — الحملة التي ينطبق عليها سجل الحالة هذا.
* [نظرة عامة على Management API](/ar/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.

````