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

## getCameraList

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

### Description

Get home camera device list

### Parameters

`Params`

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

### Referenced Types

##### `type` QueryCameraListDto

| Property | Type | Description |
| --- | --- | --- |
| `homeId` | `string` | Home ID |
| `stockId` | `string` | Stock ID (optional) |
| `pids` | `string` | Product ID list (optional; used as a product filter) |
| `ownerType` | `1 \| 0` | Ownership dimension: 0 device-level, 1 account-level |
| `serviceCode` | `string` | Service code (optional) |
| `commodityCode` | `string` | Product code (optional) |
| `categoryCode` | `string` | Business category code (required) |

##### `type` BindDeviceInfo

| Property | Type | Description |
| --- | --- | --- |
| `isBindCurrentService` | `boolean` | Whether to bind the current service |

##### `interface` DeviceInfo

| Property | Type | Description |
| --- | --- | --- |
| `productId` | `string` | Product ID |
| `planList` | `PlanInfoDto[]` | Device service plan list |
| `isUseFreeService` | `0 \| 1` | Whether the first-term free subscription item has been purchased (0 = not purchased, 1 = purchased) |
| `isUseCommonUserTrail` | `0 \| 1` | Whether a standard trial (account-level free item) has been purchased before (0 = not purchased, 1 = purchased) |
| `isUseCommonDeviceTrail` | `0 \| 1` | Whether a standard trial (device-level free item) has been purchased before (0 = not purchased, 1 = purchased) |
| `isTried` | `0 \| 1` | Whether the item has been tried (0 = not tried, 1 = tried) |
| `hasServiceOrder` | `boolean` | Whether a service ticket exists |
| `icon` | `string` | Device icon |
| `name` | `string` | Device name |
| `ownerId` | `string` | Home ID |
| `uuid` | `string` | Device unique ID |
| `roomName` | `string` | Room name |
| `deviceId` | `string` | Device deviceId |
| `isBind` | `"DeviceBindStatus.BINDING" \\| "DeviceBindStatus.NOT_SUPPORT" \\| "DeviceBindStatus.NOT_BIND"` | Binding status (Bound / Not supported / Unbound) |
| `status` | `boolean` | Device status |
| `aiSmartFreeDev` | `boolean` | Whether the current device is whitelisted for aiSmart capabilities |

##### `enum` DeviceBindStatus

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

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


### Examples

#### Request example

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

getCameraList({ homeId: '194137', categoryCode: 'ipc' })
  .then((res) => console.log(res))
  .catch(console.error);
```

#### Response example

```json
{
  "totalDevices": 1,
  "bindDeviceNum": 1,
  "list": [
    {
      "uuid": "vdevo176127325226099",
      "name": "Camera 1",
      "online": true,
      "iconUrl": "https://images.example.com/icon.png",
      "isBindCurrentService": true
    }
  ]
}
```
