# Operate card

> Freeze, unfreeze, or terminate an existing card.

```yaml
openapi: 3.1.0
info:
  title: Operate card
  version: 1.0.0
  description: Freeze, unfreeze, or terminate an existing card.
paths:
  /api/v1/merchant/card/operate:
    post:
      summary: Operate card
      description: Freeze, unfreeze, or terminate an existing card.
      parameters:
        - name: ApiKey
          in: header
          required: true
          description: Issuing API key request header assigned by Onerway.
          schema:
            type: string
            description: Issuing API key request header assigned by Onerway.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clientRequestId:
                  type: string
                  description: Idempotent request ID for this card operation.
                cardId:
                  type: integer
                  description: Card ID to operate on.
                type:
                  type: string
                  description: Card operation type.
                  enum:
                    - FREEZE
                    - UNFREEZE
                    - TERMINATE
                  x-enum-descriptions:
                    FREEZE: Freeze the card.
                    UNFREEZE: Unfreeze the card.
                    TERMINATE: Terminate the card.
              required:
                - clientRequestId
                - cardId
                - type
            examples:
              freeze:
                summary: Freeze card
                value:
                  cardId: 100001
                  clientRequestId: REQ_20260101_002
                  type: FREEZE
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Business response code. `20000` means success.
                  respMsg:
                    type: string
                    description: Response message.
                  data:
                    type:
                      - object
                      - "null"
                    properties:
                      operateRecordId:
                        type: integer
                        description: Operation record ID.
                    description: Card operation result.
                    x-onerway-value:
                      nullable: true
                      when:
                        en: Returned as `null` when the operation fails.
                        zh: 操作失败时返回 `null`。
              examples:
                success:
                  summary: Success
                  value:
                    respCode: "20000"
                    respMsg: success
                    data:
                      operateRecordId: 200001
```
