APIs Related to Construction Category

Last Updated on : 2025-05-30 01:56:03download

Construction category. Used to create construction work order or construction template

API List

Request method API Description
GET /v2.0/osaas/construction/device/categories API for Obtaining the List of Construction Device Categories.
GET /v1.0/osaas/construction/infrared/categories API for Obtaining the List of Construction Infrared Device Categories.
GET /v1.0/osaas/construction/split-device/categories API for Obtaining the List of Construction Split Device Categories.

API for Obtaining the List of Construction Device Categories

API Description

You can use this API to obtain the list of construction device categories.

API Address

GET /v2.0/osaas/construction/device/categories

Response Parameters

Parameter Type Description
code Integer Response code.Null indicates success.
success Boolean Request result.
true: success
false: failure
msg String Exception message.It is null when the request result is success.
t Long Response time, which is a 13-digit timestamp.
result Arrays The list of construction device categories.

Parameters in result

Parameter Type Description
category String Device category.
construction_category String Construction category.
category_name String Category name.
icon String icon
type String type(WIFI、ZIGBEE)

Request Example

GET {url}/v2.0/osaas/construction/device/categories

Success Response Example

{ "success": true, "t": 1539776581583, "result": [ { "category": "wfcon", "construction_category": "wf_zig_wfcon", "icon": "https://images.tuyacn.com/smart/saas/category_ic on/WangGuan.png", "category_name": "Gateway(zigbee)", "type": "ZIGBEE" } ] }

Failure Response Example

{ "code": 500, "msg": "system error,please contact the admin", "success": false, "t": 1561378856383 }

API for Obtaining the List of Construction Infrared Device Categories

API Description

You can use this API to obtain the list of construction device categories.

API Address

GET /v1.0/osaas/construction/infrared/categories

Response Parameters

Parameter Type Description
code Integer Response code.Null indicates success.
success Boolean Request result.
true: success
false: failure
msg String Exception message.It is null when the request result is success.
t Long Response time, which is a 13-digit timestamp.
result Arrays The list of construction infrared device categories.

Parameters in result

Parameter Type Description
category_id String Unique ID of a category.
category_name String Category name.

Request Example

GET {url}/v1.0/osaas/construction/infrared/categories

Success Response Example

{ "success": true, "t": 1539776581583, "result": [ { "category_id": "1", "category_name": "Set-top box" } ] }

Failure Response Example

{ "code": 500, "msg": "system error,please contact the admin", "success": false, "t": 1561378856383 }

API for Obtaining the List of Construction Split Device Categories

API Description

You can use this API to obtain the list of construction split device categories.

API Address

GET /v1.0/osaas/construction/split-device/categories

Response Parameters

Parameter Type Description
code Integer Response code.Null indicates success.
success Boolean Request result.
true: success
false: failure
msg String Exception message.It is null when the request result is success.
t Long Response time, which is a 13-digit timestamp.
result Array The list of construction split device categories.

Parameters in result

Parameter Type Description
category_code String Split category code.
category_name String Split category name.

Request Example

GET {url}/v1.0/osaas/construction/split-device/categories

Success Response Example

{ "success": true, "t": 1539776581583, "result": [ { "category_code": "dj", "category_name": "Lamp" } ] }

Failure Response Example

{ "code": 500, "msg": "system error,please contact the admin", "success": false, "t": 1561378856383 }

Error Code

The following are common business exceptions for this interface. For more exception errors, see Global Error Codes.

error code explain
500 system error