QueryProduct

Last Updated on : 2025-09-18 00:37:10Copy for LLMView as MarkdownDownload PDF

Call this operation to query the details of a specified product.

Request Parameters

Name Type Required Sample Values Description
Action String Yes QueryProduct System defined parameters. Value: QueryProduct.
ProductKey String Yes A1BwAGV * * * * Of the product ProductKey .

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return data

Name Type Sample Values Description
Code String Iot.system.SystemException The error code returned when the call fails. For more information, see Error codes.
Data Struct The details of the product information returned when the call is successful.
AliyunCommodityCode String Iothub_senior Product type, which determines whether to use the object model function. Value:
  • Iothub_senior : Use the Thing Model.
AuthType String Secret The authentication method for devices under the product to access the IoT platform.
  • Secret use the device key for device authentication.
CategoryKey String Lighting The identifier of the category to which the product belongs. If the product uses the standard category model predefined by the IoT platform, this parameter is returned.
CategoryName String Street Lamp Lighting The name of the category to which the product belongs. If the product uses the standard category model predefined by the IoT platform, this parameter is returned.
DataFormat Integer 1 Type of data communication protocol between the device and the cloud. Value:
  • 0 : Pass-through mode. Use a custom serial data format. In this mode, the device can report raw data (such as binary data streams). IoT platform runs the data parsing script you configured in the cloud to convert the raw data into the JSON standard data format.
  • 1 : JSON. The data exchange protocol between devices and the cloud defined by IoT platform is in JSON format.
Description String Intelligent street lamp Product description.
DeviceCount Integer 0 The number of devices under this product.
GmtCreate Long 1581595942000 The creation time of the product. The millisecond timestamp.
ID2 Boolean False Whether the product uses ID² authentication. Value:
  • true : using id² authentication.
  • false ID² authentication is not used.
NetType Integer 3 The networking mode of devices under the product. Value:
  • 3 : Wi-Fi.
  • 6 : Cellular(2G/3G/4G/5G) Cellular network.
  • 7 : Ethernet Ethernet.
  • 8 : Other.
NodeType Integer 0 The node type of the product. Value:
  • 0 : Equipment. Devices cannot be attached to sub-devices. They can be directly connected to the IoT Hub or connected to the IoT Hub as a sub-device of the Gateway.
  • 1 : Gateway. The Gateway can mount sub-devices, have a sub-device management module, maintain the topological relationship of sub-devices, and synchronize the topological relationship to the cloud.
Owner Boolean True Whether the caller is the owner of the product.
  • true : Yes.
  • false : No.
ProductKey String A1T27vz * * * * The ProductKey of the product. The globally unique identifier issued by IoT Platform for a product when it is created.
ProductName String Street lamp The product name.
ProductSecret String U5tW7i44uilc * * * * The product key.
ProductStatus String DEVELOPMENT_STATUS The status of the product.
  • DEVELOPMENT_STATUS : In development.
  • RELEASE_STATUS : The product has been released.
ProtocolType String Modbus The protocol type of the sub-device access gateway. The product node type is a parameter unique to the device to access the gateway. Value:
  • Ble : BLE agreement.
  • Zigbee : ZigBee protocol.
ValidateType Integer 1 Data validation level. Values available:
  • 2 : No verification. The reported data is not verified, and the full data is transferred. The data is not displayed in the Device Details page of the corresponding device in the IoT Platform console.
  • 1 : Weak checksum. Only the idetifier and dataType fields of the device data are verified, other fields are not verified, and the full data is forwarded.
ErrorMessage String System exception Error information returned when the call fails.
RequestID String E4F94B97-1D64-4080-BFD2-67461667AA43 The unique identifier generated by the request.
Success Boolean True Whether the call was successful.
  • True : Indicates that the call was successful.
  • False : Indicates that the call failed.

Example

Request Example

curl 'https://endpoint/?Action=QueryProduct&SignatureNonce=e6a6df3e71314699a5dad599a5ab8d29&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T07%3A41%3A29Z&ProductKey=k1ymv1DuLfE&Signature=c8ba39PNDXFuPRIjypMJLu%2FusyE%3D'

Normal return example

{
    "Data": {
        "AliyunCommodityCode": "iothub_senior",
        "AuthType": "secret",
        "CategoryKey": "",
        "CategoryName": "",
        "DataFormat": 1,
        "Description": "",
        "DeviceCount": 1,
        "GmtCreate": 1731858564256,
        "Id2": false,
        "NodeType": 0,
        "Owner": true,
        "ProductKey": "k1ymv1DuLfE",
        "ProductName": "demo网关",
        "ProductSecret": "",
        "ProductStatus": "DEVELOPMENT_STATUS",
        "ValidateType": 1
    },
    "RequestId": "665ab7d2-cdca-4b1b-bd6b-03d5cf7ca36b",
    "Code": "",
    "Success": true
}