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

# 禁用设备

有时，您可能希望禁用与机器关联的设备，以阻止其处理付款和订单。您可以使用以下端点，通过 Lynx API 以编程方式快速完成此操作。

[/reference/lynx/devices/update-device](https://devzone.nayax.com/reference/lynx/devices/update-device.md)

> [!WARNING]
>
> 验证
>
> 请参阅本文档的[“安全和令牌”](https://devzone.nayax.com/docs/manage-data-operations/lynx-api/security)页面，了解如何访问您的令牌，以及如何正确使用它来验证您的 API 请求。

## 禁用设备

使用 [Update Device](https://devzone.nayax.com/reference/lynx/devices/update-device.md) 端点更新设备的状态。您需要提供 `DeviceID`、`ActorID`（运营商 ID）以及新的状态标志。请参见下方代码块中的示例请求：

```sh theme={null}
curl -X PUT "https://qa-lynx.nayax.com/operational/v1/devices/<DEVICE_ID>" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "ActorID": "<ACTOR_ID>",
  "StatusID": 2
}'
```

> [!NOTE]
>
> 路径参数
>
> Replace `<DEVICE_ID>` with the actual identifier of the device you want to disable.

在 Body 参数中，您需要提供以下内容：

| 身体参数 | 类型 | 描述 |
| :- | :- | :- |
| `ActorID` | `int64` | 与该设备关联的运营商的标识符。 |
| `StatusID` | `int32` | 设备的状态标识符：1 = Active（激活），2 = Inactive（未激活）。 |

因此，要禁用设备，请将 `StatusID` 更改为 2。响应将显示该设备的详细信息，确认设备状态已被禁用。

## 验证更新

您还可以使用 [Get Device by DeviceID](https://devzone.nayax.com/reference/lynx/devices/get-device-by-deviceid.md) 端点检索设备信息，以验证更新是否成功。

另一种验证方法是在 Nayax Core 中，您可以查看每个设备的详细信息并验证其当前状态。请按照以下步骤操作：

1. 在您的仪表板中，转到**管理 > 设备**。
2. 使用搜索功能来筛选设备列表。
3. 从列表中选择所需的设备。
4. 打开\*\*“常规信息”**选项卡并查看**“状态”\*\*字段。

![](https://mintcdn.com/nayax-44d6e37b/VrZ-OU46FUlkm5RA/images/docs/disabling-a-device/image1.png?fit=max\&auto=format\&n=VrZ-OU46FUlkm5RA\&q=85\&s=958e81449634f5801d27be0f636e4694)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.