Bind the Organization

2022-06-23
No Rating

Device request: bind corresponding organization through device binding code

Topic:

thing/product/{pid}/requests

Parameter Explanation:

ParameterRequiredTypeIllustration
tidYstring
bidYstring
methodYstringmessage Type
timestampYint13-bit timestamp
dataYobject
» bind_devicesYbind_devices<bind_device>
»» device_binding_codeYstringDevice binding code
»» organization_idYstringOrganization ID
»» device_callsignYstringDevice callsign
»» snYstringDevice serial number
»» device_model_keyYstringProduct enumeration value

Example:

// topic thing/product/{pid}/requests
{
  "method":"airport_organization_bind",
  "bid":"ab1a23d2-0793-42fb-b9d2-8e4f781713e3",
  "tid":"10c38085-25b2-4192-9d67-9592a6915262",
  "timestamp":1654051026244,
  "data":{
    "bind_devices":[
      {
        "device_binding_code":"device_binding_code",
        "organization_id":"organization_id",
        "device_callsign":"dock-device-callsign",
        "sn":"dock-sn",
        "device_model_key":"3-1-0"
      },
      {
        "device_binding_code":"device_binding_code",
        "organization_id":"organization_id",
        "device_callsign":"drone-device-callsign",
        "sn":"drone-sn",
        "device_model_key":"0-67-0"
      }
    ]
  }
}

Server reply: bind corresponding organization through device binding code

Topic:

thing/product/{pid}/requests_reply

Parameter Explanation:

ParameterRequiredTypeIllustration
tidYstring
bidYstring
methodYstringmessage Type
timestampYint13-bit timestamp
dataYobject
» resultYintThe response result of 0 means normal
» outputYobjectoutput
»» err_infosYarray<err_info>Error information
»»» snYstringDevice serial number
»»» err_codeYintError code

Example:

// topic  thing/product/{pid}/requests_reply
{
  "method":"airport_organization_bind",
  "tid":"123",
  "bid":"456",
  "timestamp":"1234567890123",
  "data":{
    "result":0,
    "output":{
      "err_infos":[
        {
          "sn":"dock-sn",
          "err_code":210231
        },
        {
          "sn":"drone-sn",
          "err_code":210231
        }
      ]
    }
  }
}