Creates a new service request within the current account context for the logged-in user.
Behavior:
- Validates account and user context
- Creates a new service request using request data
- Generates a request number
- Returns the created service request details
- Logs the action as a service request created
- Demohttps://demozone.zlinkfm.com/RND/api/v2/maintenance/servicerequest/createrequest
curl -i -X POST \
https://demozone.zlinkfm.com/RND/api/v2/maintenance/servicerequest/createrequest \
-H 'Content-Type: application/json-patch+json' \
-d '{
"requesterUserId": "string",
"fileFieldValuesToRemove": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"locationInfo": [
{
"locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",
"buildingId": "fee3295a-6e55-45b0-a091-7b4de7e39de7",
"levelId": "a70368c7-b12e-43a9-9830-ab2485710b95",
"roomId": "c3631f02-ff67-42b8-8775-18c47f52a678",
"assetId": "9179b887-04ef-4ce5-ab3a-b5bbd39ea3c8",
"planFileInfo": [
{
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataFieldValue": "string",
"dataFieldlabel": "string",
"dataFieldValueIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"fromDate": "string",
"toDate": "string",
"dataFieldValueRangeType": "string"
}
],
"geoJsonData": {
"type": "string",
"features": [
{
"type": "string",
"id": 0,
"properties": {
"property1": null,
"property2": null
},
"geometry": {
"property1": null,
"property2": null
}
}
]
},
"markupDataInfo": {
"cadPlanId": "cbfa2ff4-dbca-4f20-8310-039efa6d984b",
"description": "string",
"markupData": "string"
},
"assetSvgFileId": "9f1aea3d-799f-4d76-9f96-fb6c4bb0dcef"
}
],
"relatedTaskId": "83b378c7-7a61-4d0c-a7c1-0c4f0e7cf8cf",
"relationId": "4b4bc808-5132-481f-afc2-e3872bf12049",
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"serviceRequestDescription": "string",
"workTypeId": "7180e94f-af61-4de4-a1a3-d0b22a87b10a",
"workTypeCategoryId": "ffbe7eb1-e757-4565-accf-7cdecdd2e5dc",
"assets": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"fileFieldValues": [
{
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataFieldValue": "string",
"dataFieldlabel": "string",
"dataFieldValueIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"fromDate": "string",
"toDate": "string",
"dataFieldValueRangeType": "string"
}
],
"additionalFieldValues": [
{
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataFieldValue": "string",
"dataFieldlabel": "string",
"dataFieldValueIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"fromDate": "string",
"toDate": "string",
"dataFieldValueRangeType": "string"
}
],
"actionPointUsers": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"title": "string",
"endParentItemOnCancelling": true,
"completeBeforeParentActionPointIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"geoJsonData": {
"type": "string",
"features": [
{
"type": "string",
"id": 0,
"properties": {
"property1": null,
"property2": null
},
"geometry": {
"property1": null,
"property2": null
}
}
]
}
}'Response
{
"data": {
"requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",
"requestNumber": "string",
"requestType": "string",
"title": "string",
"requestDescription": "string",
"requestedOn": "string",
"requesterDetails": {
"requesterName": "string",
"requesterEmail": "string",
"requesterContactNumber": "string"
},
"status": {
"statusId": "e900225c-0629-4e96-be6e-86a17a309645",
"statusCode": "string",
"statusName": "string",
"statusColor": "string"
},
"priority": {
"priorityName": "string",
"priorityRank": 0,
"description": "string",
"priorityColorCode": "string",
"priorityId": "a57eab25-838b-40cc-a576-57e4056f1d6c"
},
"workOrderNumber": "string",
"files": [
{
"fileName": "string",
"fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
"fileSize": "string",
"dateAddedOn": "string",
"isLinkedDocument": true,
"preview": {
"hasFilePreview": true,
"hasFileThumbnail": true,
"previewURL": "string",
"thumbnailUrl": "string"
},
"fileType": {
"fileTypeId": "4e54faea-5a86-4e82-9bdd-545d4e485d6f",
"fileTypeName": "string",
"fileTypeIconURL": "string",
"fileExtentions": [
"string"
]
},
"isImage": true,
"isCadFile": true,
"customProperties": {
"property1": null,
"property2": null
},
"isEditable": true,
"addedBy": "string",
"fileSizeInBytes": 0,
"fileStatus": {
"statusId": "e900225c-0629-4e96-be6e-86a17a309645",
"statusCode": "string",
"statusName": "string",
"statusColor": "string"
},
"revisionNumber": 0,
"addedOn": "2019-08-24T14:15:22Z",
"isFavorite": true,
"folderPath": "string",
"categoryUniqueId": "57929879-040e-4360-a67f-564710268d7d",
"categoryLevelOrdinal": 0,
"documentNumber": "string",
"fileGroupId": "4aa913cb-e81a-45b1-a40b-6c8de6d85028",
"hasPermissionToUpdate": true,
"responseDescription": "string"
}
],
"workType": {
"worktypeId": "28eb7caa-2c70-4ac0-adbe-25b091f7c6ba",
"worktypeName": "string",
"worktypeCode": "string",
"worktypeDescription": "string",
"autoApproveNewRequest": true,
"canUpdateRequestDescription": true
},
"workTypeCategory": {
"worktypeCategoryId": "5c846d9d-ca66-4d9c-a44e-ce03518d28af",
"worktypeCategoryName": "string",
"worktypeCategoryCode": "string",
"worktypeCategoryDescription": "string",
"autoApproveNewRequest": true,
"parentWorkTypeCategory": {},
"levelOrdinal": 0,
"workType": {
"worktypeId": "28eb7caa-2c70-4ac0-adbe-25b091f7c6ba",
"worktypeName": "string",
"worktypeCode": "string",
"worktypeDescription": "string",
"autoApproveNewRequest": true,
"canUpdateRequestDescription": true
},
"workFlow": {
"workType": {
"worktypeId": "28eb7caa-2c70-4ac0-adbe-25b091f7c6ba",
"worktypeName": "string",
"worktypeCode": "string",
"worktypeDescription": "string",
"autoApproveNewRequest": true,
"canUpdateRequestDescription": true
},
"workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
"workflowName": "string",
"workflowCode": "string",
"workflowRevisions": 0,
"responseDescription": "string"
},
"worktypeCategories": [
{}
],
"canUpdateRequestDescription": true
},
"additionalInfo": [
{
"dataField": "string",
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"dataFieldValue": null,
"dataFieldName": "string",
"dataValueFormated": "string"
}
],
"requestedFor": {
"requesterName": "string",
"requesterEmail": "string",
"requesterContactNumber": "string"
},
"currentActionPoint": "string",
"actionBy": "string",
"siteName": "string",
"buildingName": "string",
"geoJsonData": {
"type": "string",
"features": [
{
"type": "string",
"id": 0,
"properties": {
"property1": null,
"property2": null
},
"geometry": {
"property1": null,
"property2": null
}
}
]
},
"serviceRequestInitialInfo": [
{
"dataField": "string",
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"dataFieldValue": null,
"dataFieldName": "string",
"dataValueFormated": "string"
}
],
"hasAnyOnGoingLabours": true,
"responseDescription": "string",
"dueDate": "string",
"organizationalUnitLevel1": "string",
"filefieldValues": [
{
"dataFieldId": "b6507240-6286-4e43-b3da-bd23ecf1c322",
"dataFieldValue": "string",
"dataFieldlabel": "string",
"dataFieldValueIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"fromDate": "string",
"toDate": "string",
"dataFieldValueRangeType": "string"
}
],
"assets": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"locationDetails": [
{
"floorLevel": {
"buildingAssetLevelId": 0,
"buildingAssetLevelName": "string",
"buildingAssetLevelOrdinal": 0,
"description": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"buildingAssetId": 0,
"buildingAsset": {
"assetId": 0,
"assetTypeId": 0,
"equipmentCategory": {
"assetTypeId": 0,
"assetTypeName": "string",
"assetCategoryId": 0,
"assetCategory": {},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"symbolId": 0,
"assetSymbol": {},
"structureTypeId": 0,
"structureType": {},
"description": "string",
"symbolColorCode": "string",
"assetTypeCode": "string"
},
"assetMetadata": {
"assetId": 0,
"asset": {},
"assetMetaData": "string"
},
"assetGeometry": {
"assetId": 0,
"asset": {},
"geoJSONString": "string",
"geoReferenceData": "string"
},
"assetSummary": {
"assetId": 0,
"asset": {},
"workSummary": "string",
"operationSummary": "string",
"performanceSummary": "string",
"subItemsSummary": "string"
},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"assetIdentifier": "string",
"assetDescription": "string",
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"ytdCost": 0.1,
"dateOfExpiry": "2019-08-24T14:15:22Z",
"assetCategoryId": 0,
"assetCategory": {
"assetCategoryId": 0,
"assetCategoryName": "string",
"uniqueAssetCategoryCode": "string"
},
"statusId": 0,
"isUtilityAsset": true,
"assetClassId": 0,
"equipmentType": {
"assetClassId": 0,
"assetClassName": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"statusId": 0,
"assetTypeId": 0,
"assetType": {},
"symbolId": 0,
"assetSymbol": {},
"symbolColorCode": "string"
},
"currentAssetLocationId": 0,
"assetLocation": {
"assetLocationId": 0,
"assetId": 0,
"asset": {},
"geoLocation": "string",
"locationId": 0,
"location": {},
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelId": 0,
"buildingAssetLevel": {},
"roomId": 0,
"assignedOn": "2019-08-24T14:15:22Z",
"previousLocationId": 0,
"previousLocation": {},
"workSpaceId": 0,
"cadPlanCoordinates": "string"
},
"assetLocations": [
{}
],
"isGrouped": true,
"lotNumber": "string",
"quantity": 0,
"buildingAssetLevels": [
{}
],
"assetExtendedField": {
"assetExtendedFieldId": 0,
"assetId": 0,
"asset": {},
"dateOfManufacture": "2019-08-24T14:15:22Z",
"currentLocationId": 0,
"currentLocation": {},
"isAssigned": true,
"yearofInstallation": 0,
"replacementYear": 0,
"purchaseCost": 0.1,
"barcode": "string",
"manufacturerId": 0,
"model": "string",
"installationDate": "2019-08-24T14:15:22Z",
"svgFileId": 0
},
"assetFiles": [
{}
],
"parentAsset": {},
"ownershipTypeId": 0,
"replacementCost": 0.1,
"repairCost": 0.1,
"remainingUsefulLife": 0.1,
"estimatedUsefulLife": 0.1,
"facilityConditionIndex": 0.1,
"buildingAssetArea": 0.1
},
"buildingAssetLevelMetadata": {
"buildingAssetLevelId": 0,
"buildingAssetLevelMetaData": "string",
"buildingAssetLevel": {}
},
"statusId": 0,
"levelArea": 0.1
},
"location": {
"locationId": 0,
"locationName": "string",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"geoLocation": "string",
"regionId": 0,
"region": {
"regionId": 0,
"regionName": "string",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"geoLocation": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44"
},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"address": "string",
"description": "string",
"locationMetadata": {
"locationId": 0,
"locationMetaData": "string",
"location": {}
},
"timeZoneId": 0,
"noOfBuildings": 0,
"noOfActiveBuildings": 0,
"isCadPlanExist": true,
"locationGeometry": {
"locationId": 0,
"location": {},
"geoJSONString": "string",
"geoReferenceData": "string"
},
"locationArea": 0.1
},
"building": {
"assetId": 0,
"assetTypeId": 0,
"equipmentCategory": {
"assetTypeId": 0,
"assetTypeName": "string",
"assetCategoryId": 0,
"assetCategory": {
"assetCategoryId": 0,
"assetCategoryName": "string",
"uniqueAssetCategoryCode": "string"
},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"symbolId": 0,
"assetSymbol": {
"symbolId": 0,
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"symbolName": "string",
"gisSymbolIcon": "string",
"symbolGeometry": "string",
"symbolIcon": "string",
"statusId": 0,
"symbolColorCode": "string"
},
"structureTypeId": 0,
"structureType": {
"structureTypeId": 0,
"structureTypeName": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44"
},
"description": "string",
"symbolColorCode": "string",
"assetTypeCode": "string"
},
"assetMetadata": {
"assetId": 0,
"asset": {},
"assetMetaData": "string"
},
"assetGeometry": {
"assetId": 0,
"asset": {},
"geoJSONString": "string",
"geoReferenceData": "string"
},
"assetSummary": {
"assetId": 0,
"asset": {},
"workSummary": "string",
"operationSummary": "string",
"performanceSummary": "string",
"subItemsSummary": "string"
},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"assetIdentifier": "string",
"assetDescription": "string",
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"ytdCost": 0.1,
"dateOfExpiry": "2019-08-24T14:15:22Z",
"assetCategoryId": 0,
"assetCategory": {
"assetCategoryId": 0,
"assetCategoryName": "string",
"uniqueAssetCategoryCode": "string"
},
"statusId": 0,
"isUtilityAsset": true,
"assetClassId": 0,
"equipmentType": {
"assetClassId": 0,
"assetClassName": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"statusId": 0,
"assetTypeId": 0,
"assetType": {
"assetTypeId": 0,
"assetTypeName": "string",
"assetCategoryId": 0,
"assetCategory": {},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"symbolId": 0,
"assetSymbol": {},
"structureTypeId": 0,
"structureType": {},
"description": "string",
"symbolColorCode": "string",
"assetTypeCode": "string"
},
"symbolId": 0,
"assetSymbol": {
"symbolId": 0,
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"symbolName": "string",
"gisSymbolIcon": "string",
"symbolGeometry": "string",
"symbolIcon": "string",
"statusId": 0,
"symbolColorCode": "string"
},
"symbolColorCode": "string"
},
"currentAssetLocationId": 0,
"assetLocation": {
"assetLocationId": 0,
"assetId": 0,
"asset": {},
"geoLocation": "string",
"locationId": 0,
"location": {
"locationId": 0,
"locationName": "string",
"statusId": 0,
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"geoLocation": "string",
"regionId": 0,
"region": {},
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"address": "string",
"description": "string",
"locationMetadata": {},
"timeZoneId": 0,
"noOfBuildings": 0,
"noOfActiveBuildings": 0,
"isCadPlanExist": true,
"locationGeometry": {},
"locationArea": 0.1
},
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelId": 0,
"buildingAssetLevel": {
"buildingAssetLevelId": 0,
"buildingAssetLevelName": "string",
"buildingAssetLevelOrdinal": 0,
"description": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelMetadata": {},
"statusId": 0,
"levelArea": 0.1
},
"roomId": 0,
"assignedOn": "2019-08-24T14:15:22Z",
"previousLocationId": 0,
"previousLocation": {},
"workSpaceId": 0,
"cadPlanCoordinates": "string"
},
"assetLocations": [
{
"assetLocationId": 0,
"assetId": 0,
"asset": {},
"geoLocation": "string",
"locationId": 0,
"location": {},
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelId": 0,
"buildingAssetLevel": {},
"roomId": 0,
"assignedOn": "2019-08-24T14:15:22Z",
"previousLocationId": 0,
"previousLocation": {},
"workSpaceId": 0,
"cadPlanCoordinates": "string"
}
],
"isGrouped": true,
"lotNumber": "string",
"quantity": 0,
"buildingAssetLevels": [
{
"buildingAssetLevelId": 0,
"buildingAssetLevelName": "string",
"buildingAssetLevelOrdinal": 0,
"description": "string",
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelMetadata": {},
"statusId": 0,
"levelArea": 0.1
}
],
"assetExtendedField": {
"assetExtendedFieldId": 0,
"assetId": 0,
"asset": {},
"dateOfManufacture": "2019-08-24T14:15:22Z",
"currentLocationId": 0,
"currentLocation": {
"assetLocationId": 0,
"assetId": 0,
"asset": {},
"geoLocation": "string",
"locationId": 0,
"location": {},
"buildingAssetId": 0,
"buildingAsset": {},
"buildingAssetLevelId": 0,
"buildingAssetLevel": {},
"roomId": 0,
"assignedOn": "2019-08-24T14:15:22Z",
"previousLocationId": 0,
"previousLocation": {},
"workSpaceId": 0,
"cadPlanCoordinates": "string"
},
"isAssigned": true,
"yearofInstallation": 0,
"replacementYear": 0,
"purchaseCost": 0.1,
"barcode": "string",
"manufacturerId": 0,
"model": "string",
"installationDate": "2019-08-24T14:15:22Z",
"svgFileId": 0
},
"assetFiles": [
{
"assetId": 0,
"asset": {},
"fileId": 0,
"file": {},
"defaultImage": true
}
],
"parentAsset": {},
"ownershipTypeId": 0,
"replacementCost": 0.1,
"repairCost": 0.1,
"remainingUsefulLife": 0.1,
"estimatedUsefulLife": 0.1,
"facilityConditionIndex": 0.1,
"buildingAssetArea": 0.1
},
"organizationUnit": {
"orgUnitLevel1": {
"levelName": "string",
"unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
"unitName": "string"
},
"orgUnitLevel2": {
"levelName": "string",
"unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
"unitName": "string"
},
"orgUnitLevel3": {
"levelName": "string",
"unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
"unitName": "string"
},
"orgUnitLevel4": {
"levelName": "string",
"unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
"unitName": "string"
},
"orgUnitLevel5": {
"levelName": "string",
"unitIdentifier": "fef1588a-8d1a-434b-be83-95ca43e0251a",
"unitName": "string"
},
"orgUnits": {
"primaryUnits": "string",
"secondaryUnits": "string"
}
}
}
],
"taskDetails": {
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"taskNumber": "string",
"statusId": 0,
"taskItemType": "string",
"addedOn": "string"
}
},
"message": "string",
"isError": true,
"messageCode": 0,
"status": "string",
"errorType": "string",
"traceid": "string",
"responseDescription": "string"
}