Add Space

Last Updated on : 2023-06-21 07:13:11download

Add a space under the community, including community, building, unit, and floor. A unique space ID in the SaaS solution will be returned. A response will be returned to indicate whether the operation is successful.

API address

POST: /v1.0/iot-02/community/space

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
block_idString trueThe ID of the community.
parent_tree_idString falseThe ID of a specified parent node.
meta_codeString trueThe space type.
  • area: The area.
  • building: the building.
  • unit: the unit.
  • floor: the floor.
  • house: the house.
valueString trueThe name.
building_typeInteger falseThe type of building.
  • 1: Commercial building.
  • 2: Residential building.
  • 3: Commercial and residential building.
building_towardInteger falseThe direction of a specified building.
  • 1: East-facing.
  • 2: South-facing.
  • 3: West-facing.
  • 4: North-facing.
building_addressString falseThe geographical location of the building, including the latitude and longitude.

Return parameter

Parameter nameTypeDescription
resultStringThe ID of a specified space.

Request example

POST: /v1.0/iot-02/community/space
{
  "block_id": "136767399153950xxxx",
  "parent_tree_id": "137249370834323xxxx",
  "meta_code": "building",
  "value": "Building 1",
  "has_leaf": true,
  "building_type": 1,
  "building_toward": 1,
  "buildingAddress": "Building address"
}

Return example

"136762299153950xxxx"

Error code

For more information, see error code.