---
name: "getDeviceDetailsById"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getDeviceDetailsById

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### Description

View details of a single device

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `QueryGetDeviceDetailsById` | Yes | - | Request body |

### Referenced Types

##### `type` QueryGetDeviceDetailsById

| Property | Type | Description |
| --- | --- | --- |
| `homeId` | `string` | Home ID |
| `uuid` | `string` | Device UUID |
| `categoryCode` | `string` | Business category code |

##### `interface` PlanInfoDto

| Property | Type | Description |
| --- | --- | --- |
| `commodityCode` | `string` | Product code |
| `commodityName` | `string` | Product name |
| `env` | `number` | Environment identifier |
| `instanceId` | `string` | Instance ID (usually the device ID) |
| `isSubscribe` | `0 \| 1` | Whether subscribed to the product (0/1) |
| `orderNo` | `number` | Sort order |
| `planStatus` | `1` | Package status (e.g., in use) |
| `serviceBeginTime` | `number` | Service start time |
| `serviceEndTime` | `number` | Service end time |
| `stockId` | `string` | Inventory ID |
| `isCanceled` | `0 \| 1` | Whether unsubscribed (0/1) |
| `isAdditional` | `0 \| 1` | Whether an add-on (0/1) |

##### `enum` DeviceBindStatus

| Enum Value | Actual Value | Description |
| --- | --- | --- |
| `DeviceBindStatus.BINDING` | `1` | Bound |
| `DeviceBindStatus.NOT_SUPPORT` | `2` | Not supported |
| `DeviceBindStatus.NOT_BIND` | `3` | Unbound |


### Examples

#### Request example

```typescript
import { getDeviceDetailsById } from '@tuya-miniapp/cloud-api';

getDeviceDetailsById({
  homeId: '194137',
  uuid: 'vdevo176127325226099',
  categoryCode: 'ipc',
})
  .then((detail) => {
    console.log(detail);
  })
  .catch((err) => {
    console.error(err);
  });
```

#### Response example

```json
{
  "uuid": "vdevo176127325226099",
  "name": "Sample camera",
  "iconUrl": "https://images.example.com/icon.png",
  "online": true
}
```
