Create SR with Approvals
You can create SRs along with the Approval using the following API Request.
To authenticate the below API, see API Authentication and Authorization.
| Service Name | HTTP Method |
|---|---|
| SR_LogServiceCatalog_Workflow | POST |
{
"ServiceName": "SR_LogServiceCatalog_Workflow",
"objCommonParameters": {
"_ProxyDetails": {
"AuthType": "APIKEY",
"APIKey": "XXXXXXXXXXXXXXXXX",
"ProxyID": 0,
"TokenID": "",
"OrgID": "1",
"ReturnType": "JSON"
},
"objSRServiceTicket": {
"LogSRForUserMode": false,
"Org_ID": "1",
"DelegationMode": false,
"DelegateeUserID": 0,
"ServiceCatalogID": 1009,
"FirstLevelNotificationIDs": "",
"WorkflowID": "1226",
"HasCompleteApprovalFlow": "true",
"ServiceCategoryName": "Desktop",
"SupportFunction": "IT Tec",
"ServiceCategoryID": 1,
"ServiceCatalogName": "Multi approver",
"WorkGroupID": 1,
"Source": "web",
"JustificationRemarks": "When adding a new user to the company",
"strCustomAttributes": "\"[{\\\"Attribute_Type\\\":\\\"DropdownList\\\",\\\"Attribute_Value\\\":\\\"1509\\\",\\\"Attribute_ID\\\": 3889,\\\"Attribute_Name\\\":\\\"BuildingLocation\\\"},{\\\"Attribute_Type\\\":\\\"DropdownList\\\",",
"\\\"Attribute_ID\\\":3890,\\\"Attribute_Name\\\":\\\"Project\\\",\\\"Attribute_Value\\\":\\\"12\\\"}]\"",
"ListSRApprovals": [
{
"NotificationIDs": null,
"CurrentApprover": false,
"ApproverID": "15",
"WorkflowActivityID": 2085,
"ApprovalLevel": "1",
"AllApprover": "15",
"LevelName": "Approver1ID",
"ApproverRole": "User Selectable"
},
{
"NotificationIDs": null,
"CurrentApprover": false,
"ApproverID": "0",
"WorkflowActivityID": 2086,
"ApprovalLevel": "2",
"AllApprover": "9,11",
"LevelName": "Approver2ID",
"ApproverRole": "Test User 1 Group Approval"
},
{
"NotificationIDs": "",
"CurrentApprover": false,
"ApproverID": "0",
"WorkflowActivityID": 2087,
"ApprovalLevel": "3",
"AllApprover": "11,8,4,15,3,1045,1120,1145,1075,9,11",
"LevelName": "Approver3ID",
"ApproverRole": "Workgroup Approval"
}
],
"NoOfApprovals": 3
}
}
}
Request Parameters
| Parameter Name | Type | Description | Mandatory |
|---|---|---|---|
LogSRForUserMode | BOOLEAN | Is the SR logged for a user? The value must always be true. | FALSE |
Org_ID | INTEGER | Unique Identification number of the Organization. | FALSE |
DelegationMode | BOOLEAN | Is the delegation enabled? | FALSE |
DelegateeUserID | INTEGER | Unique Identification number of the user who is delegated with. DelegateeUserID is a mandatory parameter if the DelegationMode parameter value is true. | FALSE |
ServiceCatalogID | STRING | Unique Identification number of the Service Catalog. | FALSE |
FirstLevelNotificationIDs | STRING | Notification IDs of the first level Approvals. | FALSE |
WorkflowID | INTEGER | Unique Identification number of the Workflow. | TRUE |
HasCompleteApprovalFlow | STRING | Is the Request has complete Approval workflow? The value must be true. | FALSE |
ServiceCategoryName | STRING | Name of the Service Category. | FALSE |
SupportFunction | STRING | Name of the Instance. For Example: Info | TRUE |
ServiceCategoryID | STRING | Unique Identification number of the Service Category. | FALSE |
ServiceCatalogName | STRING | Name of the Service Catalog. | FALSE |
WorkGroupID | STRING | Unique Identification number of the Work Group. | FALSE |
Source | STRING | Name of the Source. | FALSE |
JustificationRemarks | STRING | Specify the Remarks. | FALSE |
strCustomAttributes | STRING | Custom Attributes of the SR. | FALSE |
ListSRApprovals | STRING | Details of the Approvals. | TRUE |
NoOfApprovals | STRING | Number of Approvals that are specified in the ListSRApprovals. | TRUE |
{
"Errors": "",
"Message": null,
"Output": "",
"TokenID": "",
"OrgID": 0,
"OutputObject": {
"CatalogDet ails": {
"Message": "Successfully saved the service request. Service Request ID: SR3489",
"SRId": "3489",
"UploadControlUID": []
}
}
}
Status and Error Codes
For more information, see Status and Error Messages.