> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cog888.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 更新玩家限紅

> 更新玩家的限紅設定

<Accordion title="此 API 可能返回的錯誤代碼">
  | 代碼   | 說明            |
  | ---- | ------------- |
  | 0    | 成功            |
  | 2    | 無效參數          |
  | 4    | 客戶不存在         |
  | 19   | 請求次數已達上限      |
  | 20   | Secret key 錯誤 |
  | 25   | 類型參數錯誤        |
  | 36   | 伺服器錯誤         |
  | 41   | 上級代理未持有該限紅組合  |
  | 42   | 請求頻率太高        |
  | 9999 | 未知錯誤          |
</Accordion>


## OpenAPI

````yaml /transfer-openapi.json PUT /api/v1/dt/user/limit
openapi: 3.1.0
info:
  title: 轉帳錢包 API
  description: Game-API 用於 vendor 向遊戲取得遊戲相關數據
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: Production server
security: []
paths:
  /api/v1/dt/user/limit:
    put:
      tags:
        - User API
      summary: 更新玩家限紅
      description: 更新玩家的限紅設定
      operationId: updatePlayerLimit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - platform_id
                - username
                - limit_id
                - type
                - key
              properties:
                uuid:
                  type: string
                  description: 各平台自定義的唯一性請求序號，長度 >= 32 且 <= 128 字節
                platform_id:
                  type: string
                  description: 平台方的產品 ID
                username:
                  type: string
                  description: 用戶在遊戲中的帳號（限制長度 23 字元，且皆為小寫英文或數字，一次僅支援一組）
                limit_id:
                  type: string
                  description: 限紅代號（一次僅支援一組）
                type:
                  type: string
                  description: '設置限紅種類（1: 刪除、2: 取代）。若會員本身無限紅，需使用 2（取代）來新增'
                key:
                  type: string
                  description: md5(username + limit_id + type + 平台密鑰)
            example:
              uuid: 3f1e16c7-4083-4897-b40b-55b7f674f72f
              platform_id: AXTES
              username: player001
              limit_id: '1'
              type: '2'
              key: abc123hash
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
              example:
                error:
                  code: 0
                  msg: Success
                  uuid: 3f1e16c7-4083-4897-b40b-55b7f674f72f
        '400':
          description: 錯誤
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorInfo'
    Error:
      type: object
      properties:
        code:
          type: string
          description: 錯誤代碼
        message:
          type: string
          description: 錯誤訊息
        data:
          description: 資料（通常為 null）
        status_code:
          type: integer
          description: HTTP 狀態碼
        service:
          type: string
          description: 服務名稱
    ErrorInfo:
      type: object
      properties:
        code:
          type: integer
          description: 錯誤碼
        msg:
          type: string
          description: 錯誤訊息
        uuid:
          type: string
          description: 請求序號

````