Skip to content

Add new general asset

Request

Creates a new general asset within the current account context using the provided request data.

Behavior:

  • Validates manage privilege for equipment
  • Creates a new general asset record
  • Associates the asset with the current account and user
  • Returns the created asset details
  • Logs the action as an equipment added event
Body
isAssignedboolean
assetClassIdstring, (uuid)
assetTypeIdstring or null, (uuid)
fieldValuesArray of objects or null(zLink.Business.zOne.Base.Common.AssetEntityDataFieldValue)
spaceDetailsobject(zLink.Business.zOne.Portfolio.RequestModels.SpaceDetail)
generalAssetIdsArray of strings or null, (uuid)
curl -i -X POST \
  https://demozone.zlinkfm.com/RND/api/v1/assets/general/add \
  -H 'Content-Type: application/json-patch+json' \
  -d '{
    "isAssigned": true,
    "assetClassId": "612ce5f5-12bc-4349-bd22-8eec5b4bdcd6",
    "assetTypeId": "8b5111d6-fc22-4841-bf1b-479a403efd40",
    "fieldValues": [
      {
        "dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
        "dataFieldValue": null,
        "dataFieldLabel": "string",
        "dataFieldValueIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "fromDate": "string",
        "toDate": "string",
        "dataFieldValueRangeType": "string"
      }
    ],
    "spaceDetails": {
      "buildingId": "string",
      "levelId": "string",
      "locationId": "string",
      "roomId": "string",
      "workSpaceId": "string",
      "isAssigned": true,
      "coordinates": [
        0.1
      ]
    },
    "generalAssetIds": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
  }'

Responses

OK

Body
dataobject(zLink.Business.zOne.Portfolio.ResponseModels.GeneralAssetResponseModel)
messagestring or null
isErrorboolean
messageCodeinteger, (int32)
statusstring or null
errorTypestring or null
traceidstring or null
responseDescriptionstring or null
Response
{
  "data": {
    "assetId": "9179b887-04ef-4ce5-ab3a-b5bbd39ea3c8",
    "assetIdentifier": "string",
    "assetDescription": "string",
    "assetType": {
      "assetTypeId": "8b5111d6-fc22-4841-bf1b-479a403efd40",
      "assetTypeName": "string"
    },
    "assetClass": {
      "assetClassId": "612ce5f5-12bc-4349-bd22-8eec5b4bdcd6",
      "assetClassName": "string",
      "assetType": {
        "assetTypeId": "8b5111d6-fc22-4841-bf1b-479a403efd40",
        "assetTypeName": "string"
      },
      "assetClassSymbol": {
        "symbolId": "6dee67fb-8a48-4652-be83-66515f0780d3",
        "symbolName": "string",
        "gisSymbolIcon": "string",
        "symbolColorCode": "string",
        "dwgSymbolMode": true
      },
      "responseDescription": "string"
    },
    "status": {
      "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
      "statusCode": "string",
      "statusName": "string",
      "statusColor": "string"
    },
    "expiryDate": "string",
    "manufactureDate": "string",
    "assetImage": "string",
    "locationInfo": {
      "location": "string",
      "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
      "building": "string",
      "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
      "level": "string",
      "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
      "room": "string",
      "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
      "workspace": "string",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
      "spaceKey": "string",
      "spaceAssignedOn": "string",
      "spaceCategory": {
        "spaceCategoryId": "809d6029-69b4-43c2-a738-11abe5eaf804",
        "spaceCategoryName": "string",
        "spaceCategoryCode": "string"
      },
      "roomFunction": {
        "roomFunctionId": "21215e30-d522-4a6e-b350-1cf0e9b3df3c",
        "roomFunctionName": "string"
      },
      "spaceArea": 0.1,
      "levelPlanHandle": "string",
      "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
      "rollBackInfo": {
        "isRollBack": true,
        "rollBackType": "string",
        "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
        "comments": "string"
      },
      "levelPlanId": "0f5a21ff-233b-4dbc-8296-4521bcd60dc1",
      "planFile": {
        "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
        "fileName": "string",
        "fileSize": "string",
        "currentRevisionNumber": 0,
        "createdOn": "string",
        "fileSizeInBytes": 0,
        "createdDate": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "isLatest": true
      },
      "cadPlanCoordinates": [
        0.1
      ],
      "spaceAssignedOnDateTimeFormat": "string",
      "svgPlanAdded": true
    },
    "additionalInfo": [
      {
        "dataField": "string",
        "dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
        "dataIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "dataFieldValue": null,
        "dataFieldName": "string",
        "dataValueFormated": "string"
      }
    ],
    "isAssigned": true,
    "yearofInstallation": 0,
    "replacementYear": 0,
    "purchaseCost": 0.1,
    "assetSymbol": {
      "symbolId": "6dee67fb-8a48-4652-be83-66515f0780d3",
      "symbolName": "string",
      "gisSymbolIcon": "string",
      "symbolColorCode": "string",
      "dwgSymbolMode": true
    },
    "locationDetails": {
      "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
      "locationName": "string",
      "status": {
        "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
        "statusCode": "string",
        "statusName": "string",
        "statusColor": "string"
      },
      "buildings": [
        {
          "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
          "buildingName": "string",
          "levels": [
            {
              "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
              "levelName": "string",
              "cadPlans": [
                null
              ],
              "spaceDetail": {},
              "orgUnitInfo": [
                null
              ],
              "status": {}
            }
          ],
          "buildingPlans": [
            {
              "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d",
              "planType": {},
              "planDescription": "string",
              "planModel": {},
              "planFile": {},
              "revisions": [
                null
              ],
              "locationInfo": {
                "cadPlanCoordinates": []
              },
              "assetIds": [
                null
              ],
              "svgPlanAdded": true,
              "responseDescription": "string",
              "hasAnyRevisions": true,
              "isPlanRemoved": true,
              "responseMessage": "string",
              "isCadPlanExist": true
            }
          ],
          "buildingType": "string",
          "cadPlans": [
            {
              "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d",
              "planType": {},
              "planDescription": "string",
              "planModel": {},
              "planFile": {},
              "revisions": [
                null
              ],
              "locationInfo": {
                "cadPlanCoordinates": []
              },
              "assetIds": [
                null
              ],
              "svgPlanAdded": true,
              "responseDescription": "string",
              "hasAnyRevisions": true,
              "isPlanRemoved": true,
              "responseMessage": "string",
              "isCadPlanExist": true
            }
          ],
          "location": {
            "type": "string",
            "features": [
              {
                "properties": {},
                "geometry": {}
              }
            ]
          },
          "spaceDetail": {
            "numberOfDepartments": 0,
            "totalArea": 0.1,
            "usableArea": 0.1,
            "occupied": 0,
            "vacant": 0
          },
          "status": {
            "statusId": "e900225c-0629-4e96-be6e-86a17a309645",
            "statusCode": "string",
            "statusName": "string",
            "statusColor": "string"
          },
          "responseDescription": "string",
          "latLong": [
            0.1
          ],
          "latitude": 0.1,
          "longitude": 0.1
        }
      ],
      "buildingPlans": [
        {
          "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d",
          "planType": {
            "planTypeId": "0516887d-9268-43c8-b82e-1501d9714a9a",
            "planTypeName": "string"
          },
          "planDescription": "string",
          "planModel": {
            "planModelId": "9eed1a98-11cb-4f43-8459-1812e5594dc9",
            "planModelName": "string"
          },
          "planFile": {
            "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
            "fileName": "string",
            "fileSize": "string",
            "currentRevisionNumber": 0,
            "createdOn": "string",
            "fileSizeInBytes": 0,
            "createdDate": "2019-08-24T14:15:22Z",
            "createdBy": "string",
            "isLatest": true
          },
          "revisions": [
            {
              "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
              "fileName": "string",
              "fileSize": "string",
              "currentRevisionNumber": 0,
              "createdOn": "string",
              "fileSizeInBytes": 0,
              "createdDate": "2019-08-24T14:15:22Z",
              "createdBy": "string",
              "isLatest": true
            }
          ],
          "locationInfo": {
            "location": "string",
            "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
            "building": "string",
            "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
            "level": "string",
            "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
            "room": "string",
            "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
            "workspace": "string",
            "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
            "spaceKey": "string",
            "spaceAssignedOn": "string",
            "spaceCategory": {
              "spaceCategoryId": "809d6029-69b4-43c2-a738-11abe5eaf804",
              "spaceCategoryName": "string",
              "spaceCategoryCode": "string"
            },
            "roomFunction": {
              "roomFunctionId": "21215e30-d522-4a6e-b350-1cf0e9b3df3c",
              "roomFunctionName": "string"
            },
            "spaceArea": 0.1,
            "levelPlanHandle": "string",
            "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
            "rollBackInfo": {
              "isRollBack": true,
              "rollBackType": "string",
              "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
              "comments": "string"
            },
            "levelPlanId": "0f5a21ff-233b-4dbc-8296-4521bcd60dc1",
            "planFile": {
              "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
              "fileName": "string",
              "fileSize": "string",
              "currentRevisionNumber": 0,
              "createdOn": "string",
              "fileSizeInBytes": 0,
              "createdDate": "2019-08-24T14:15:22Z",
              "createdBy": "string",
              "isLatest": true
            },
            "cadPlanCoordinates": [
              0.1
            ],
            "spaceAssignedOnDateTimeFormat": "string",
            "svgPlanAdded": true
          },
          "assetIds": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "svgPlanAdded": true,
          "responseDescription": "string",
          "hasAnyRevisions": true,
          "isPlanRemoved": true,
          "responseMessage": "string",
          "isCadPlanExist": true
        }
      ],
      "location": {
        "type": "string",
        "features": [
          {
            "type": "string",
            "id": 0,
            "properties": {
              "property1": null,
              "property2": null
            },
            "geometry": {
              "property1": null,
              "property2": null
            }
          }
        ]
      },
      "cadPlans": [
        {
          "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d",
          "planType": {
            "planTypeId": "0516887d-9268-43c8-b82e-1501d9714a9a",
            "planTypeName": "string"
          },
          "planDescription": "string",
          "planModel": {
            "planModelId": "9eed1a98-11cb-4f43-8459-1812e5594dc9",
            "planModelName": "string"
          },
          "planFile": {
            "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
            "fileName": "string",
            "fileSize": "string",
            "currentRevisionNumber": 0,
            "createdOn": "string",
            "fileSizeInBytes": 0,
            "createdDate": "2019-08-24T14:15:22Z",
            "createdBy": "string",
            "isLatest": true
          },
          "revisions": [
            {
              "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
              "fileName": "string",
              "fileSize": "string",
              "currentRevisionNumber": 0,
              "createdOn": "string",
              "fileSizeInBytes": 0,
              "createdDate": "2019-08-24T14:15:22Z",
              "createdBy": "string",
              "isLatest": true
            }
          ],
          "locationInfo": {
            "location": "string",
            "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
            "building": "string",
            "buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
            "level": "string",
            "levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
            "room": "string",
            "roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
            "workspace": "string",
            "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
            "spaceKey": "string",
            "spaceAssignedOn": "string",
            "spaceCategory": {
              "spaceCategoryId": "809d6029-69b4-43c2-a738-11abe5eaf804",
              "spaceCategoryName": "string",
              "spaceCategoryCode": "string"
            },
            "roomFunction": {
              "roomFunctionId": "21215e30-d522-4a6e-b350-1cf0e9b3df3c",
              "roomFunctionName": "string"
            },
            "spaceArea": 0.1,
            "levelPlanHandle": "string",
            "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
            "rollBackInfo": {
              "isRollBack": true,
              "rollBackType": "string",
              "employeeLocationId": "2e9ca96c-a4c6-4bdb-b2bb-33d9e60c3f1c",
              "comments": "string"
            },
            "levelPlanId": "0f5a21ff-233b-4dbc-8296-4521bcd60dc1",
            "planFile": {
              "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
              "fileName": "string",
              "fileSize": "string",
              "currentRevisionNumber": 0,
              "createdOn": "string",
              "fileSizeInBytes": 0,
              "createdDate": "2019-08-24T14:15:22Z",
              "createdBy": "string",
              "isLatest": true
            },
            "cadPlanCoordinates": [
              0.1
            ],
            "spaceAssignedOnDateTimeFormat": "string",
            "svgPlanAdded": true
          },
          "assetIds": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "svgPlanAdded": true,
          "responseDescription": "string",
          "hasAnyRevisions": true,
          "isPlanRemoved": true,
          "responseMessage": "string",
          "isCadPlanExist": true
        }
      ],
      "spaceDetail": {
        "numberOfDepartments": 0,
        "totalArea": 0.1,
        "usableArea": 0.1,
        "occupied": 0,
        "vacant": 0
      },
      "responseDescription": "string",
      "latitude": 0.1,
      "longitude": 0.1
    },
    "barcode": "string",
    "purchaseCostString": "string",
    "parentAssetType": {
      "assetTypeId": "8b5111d6-fc22-4841-bf1b-479a403efd40",
      "assetTypeName": "string"
    },
    "parentAssetClass": {
      "assetClassId": "612ce5f5-12bc-4349-bd22-8eec5b4bdcd6",
      "assetClassName": "string",
      "assetType": {
        "assetTypeId": "8b5111d6-fc22-4841-bf1b-479a403efd40",
        "assetTypeName": "string"
      },
      "assetClassSymbol": {
        "symbolId": "6dee67fb-8a48-4652-be83-66515f0780d3",
        "symbolName": "string",
        "gisSymbolIcon": "string",
        "symbolColorCode": "string",
        "dwgSymbolMode": true
      },
      "responseDescription": "string"
    },
    "parentAssetIdentifier": {
      "assetId": "9179b887-04ef-4ce5-ab3a-b5bbd39ea3c8",
      "assetIdentifier": "string"
    },
    "isGrouped": true,
    "lotNumber": "string",
    "quantity": 0,
    "manufacturer": {
      "manufcturerId": "0437b219-b394-4045-9952-a8a1a1d07f76",
      "manufacturerName": "string"
    },
    "model": "string",
    "installationDate": "string",
    "expiryDateTime": "2019-08-24T14:15:22Z",
    "replacementCost": 0.1,
    "repairCost": 0.1,
    "remainingUsefulLife": 0.1,
    "estimatedUsefulLife": 0.1,
    "facilityConditionIndex": 0.1,
    "assetWarrantyMinDate": "string",
    "responseDescription": "string"
  },
  "message": "string",
  "isError": true,
  "messageCode": 0,
  "status": "string",
  "errorType": "string",
  "traceid": "string",
  "responseDescription": "string"
}