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