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

# 更新

> PUT /qrcode/{qrid}/

在 **Management API** 主机（`management.scanova.io`）上获取、更新或删除单个二维码，使用您的原始 Management API 密钥进行身份验证。

```
GET    https://management.scanova.io/qrcode/{qrid}/
PUT    https://management.scanova.io/qrcode/{qrid}/
PATCH  https://management.scanova.io/qrcode/{qrid}/
DELETE https://management.scanova.io/qrcode/{qrid}/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField path="qrid" type="string" required>
  该二维码的 `qrid`（例如 `QR7K9M2XN`）——由 [`GET /qr/`](/zh/api-reference/management-api/qr/list) 返回的人类可读标识符，而非数字 `id`。
</ParamField>

<Tip>
  同一个视图也可以通过 `/qr/{qrid}/` 访问（即与列出/创建端点使用相同的路径前缀）——两个路径解析到完全相同的视图和行为。本参考文档以 `/qrcode/{qrid}/` 为准，因为这是本文档集所核实的路径，但两者均可使用。
</Tip>

`PUT` 和 `PATCH` 均受支持（`PUT` 用于完整替换，`PATCH` 用于部分更新），并接受与[创建二维码](/zh/api-reference/management-api/qr/create)所述相同的字段集合。更新成功会返回 `200 OK`，并附带上方展示的更新后的详情表示。

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://management.scanova.io/qrcode/QR7K9M2XN/" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
    -H "Content-Type: application/json" \
    -d '{ "name": "Product launch flyer — v2" }'
  ```
</RequestExample>

## 作用范围与错误

此处的每个方法都只对该密钥所属账户拥有的二维码生效——请求一个您不拥有的（或不存在的）`qrid` 会返回 `404`，而非 `403`，因此您无法利用此端点探测其他账户的二维码是否存在。

## 相关内容

* [获取](/zh/api-reference/management-api/qr/retrieve) — 同一端点的另一个操作。
* [删除](/zh/api-reference/management-api/qr/delete) — 同一端点的另一个操作。
* [列出二维码](/zh/api-reference/management-api/qr/list) —— 查找要在此处操作的 `qrid`，或本端点更新操作所接受的完整字段集合。
* [创建二维码](/zh/api-reference/management-api/qr/create) —— 查找要在此处操作的 `qrid`，或本端点更新操作所接受的完整字段集合。
* [下载二维码图片](/zh/api-reference/management-api/qr/download) —— 将此二维码渲染为图片文件。
* [列出回收站中的二维码](/zh/api-reference/management-api/qr/trash) —— 在此处执行 `DELETE` 后二维码会落入的位置。


## OpenAPI

````yaml api-reference/openapi/management-api.json PUT /qrcode/{qrid}/
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:
  /qrcode/{qrid}/:
    put:
      summary: Update a QR code (full replace)
      operationId: updateManagedQrCode
      parameters:
        - name: qrid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: QR code updated
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.

````