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

# 解鎖虛擬卡

`unlockVirtualCard` 變更可讓你解鎖先前被鎖定的虛擬卡，恢復其處理交易的能力。

<Info>
  **先決條件：** 具有 `EDIT_VIRTUALCARD` 範圍的使用者存取權杖，以及要解鎖之卡片的 `virtualCardId`。
</Info>

## 引數

* **`input`** (`UnlockVirtualCardInput!`): 包含要解鎖之虛擬卡 ID 的輸入物件。

## UnlockVirtualCardInput 欄位

| 欄位              | 類型      | 說明       | 必填 |
| --------------- | ------- | -------- | -- |
| `virtualCardId` | `UUID!` | 要解鎖的虛擬卡。 | 是  |

## 範例變更

```graphql theme={null}
mutation {
  unlockVirtualCard(input: { virtualCardId: "07df5653-43a8-4532-9881-3ab5857bbe11" }) {
    virtualCardId
    unlocked
  }
}
```

## cURL 範例

```bash theme={null}
curl -X POST \
  https://transactional-graph.staging.fluzapp.com/api/v1/graphql \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_USER_ACCESS_TOKEN' \
  -d '{
    "query": "mutation { unlockVirtualCard(input: { virtualCardId: \"07df5653-43a8-4532-9881-3ab5857bbe11\" }) { virtualCardId unlocked } }"
  }'
```

## 範例回應

```json theme={null}
{
  "data": {
    "unlockVirtualCard": {
      "virtualCardId": "07df5653-43a8-4532-9881-3ab5857bbe11",
      "unlocked": true
    }
  }
}
```

## 回應欄位

| 欄位              | 類型        | 說明              |
| --------------- | --------- | --------------- |
| `virtualCardId` | `UUID`    | 目標解鎖之虛擬卡的唯一識別碼。 |
| `unlocked`      | `Boolean` | 指示卡片是否已成功解鎖。    |

## 後續步驟

<CardGroup cols={2}>
  <Card title="新增帳單地址" icon="map-pin" href="/features/billing-address">
    預先儲存並管理發卡所綁定的帳單地址。
  </Card>

  <Card title="取得虛擬卡交易" icon="list" href="/features/get-virtual-card-transactions">
    透過擷取卡片交易歷史，確認消費已恢復。
  </Card>
</CardGroup>
