# 操作卡片

> 冻结、解冻或注销已有卡片。

```yaml
openapi: 3.1.0
info:
  title: 操作卡片
  version: 1.0.0
  description: 冻结、解冻或注销已有卡片。
paths:
  /api/v1/merchant/card/operate:
    post:
      summary: 操作卡片
      description: 冻结、解冻或注销已有卡片。
      parameters:
        - name: ApiKey
          in: header
          required: true
          description: Onerway 分配的发卡 API key 请求 Header。
          schema:
            type: string
            description: Onerway 分配的发卡 API key 请求 Header。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientRequestId:
                  type: string
                  description: 本次卡片操作的幂等请求 ID。
                cardId:
                  type: integer
                  description: 待操作的卡片 ID。
                type:
                  type: string
                  description: 卡片操作类型。
                  enum:
                    - FREEZE
                    - UNFREEZE
                    - TERMINATE
                  x-enum-descriptions:
                    FREEZE: 冻结卡片。
                    UNFREEZE: 解冻卡片。
                    TERMINATE: 注销卡片。
              required:
                - clientRequestId
                - cardId
                - type
            examples:
              freeze:
                summary: 冻结卡片
                value:
                  cardId: 100001
                  clientRequestId: REQ_20260101_002
                  type: FREEZE
      responses:
        "200":
          description: 成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: 业务响应码；`20000` 表示成功。
                  respMsg:
                    type: string
                    description: 响应信息。
                  data:
                    type:
                      - object
                      - "null"
                    properties:
                      operateRecordId:
                        type: integer
                        description: 操作记录 ID。
                    description: 卡片操作结果。
                    x-onerway-value:
                      nullable: true
                      when:
                        en: Returned as `null` when the operation fails.
                        zh: 操作失败时返回 `null`。
              examples:
                success:
                  summary: 成功
                  value:
                    respCode: "20000"
                    respMsg: success
                    data:
                      operateRecordId: 200001
```
