Creates a new service request within the current account context using the provided request details.
Behavior:
- Validates account and user context
- Processes the service request creation data
- Generates a new service request record
- Returns the created service request response
- Logs the action as a service request created
- Demohttps://demozone.zlinkfm.com/RND/api/v1/maintenance/servicerequests/create
curl -i -X POST \
https://demozone.zlinkfm.com/RND/api/v1/maintenance/servicerequests/create \
-H 'Content-Type: application/json-patch+json' \
-d '{
"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",
"requestSource": "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"
},
"expectedDateOfCompletion": "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
}
}
]
},
"loggedInUserExistInForActionby": true,
"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"
},
"message": "string",
"isError": true,
"messageCode": 0,
"status": "string",
"errorType": "string",
"traceid": "string",
"responseDescription": "string"
}