POST Create a Service Request
URL: http://{{server-url}}/api/v1/service_catalog/servicerequest
In order to create a new service request, you have to call the above endpoint with the following key-values:
Header
Key | Description |
---|---|
Authorization | Bearer/API key {access token obtained after authorization} |
Content-Type | application/json |
Body
You would be sending a JSON request that will create a ticket and populate its details. Some of the key-value pairs are compulsory, notice the description of each.
Keys with asterisk are mandatory.
Key | Value Type | Description |
---|---|---|
requester* | String | Requester name. |
serviceName* | String | Name of the service. |
serviceCategoryName* | String | Name of the service category. |
impactName | String | Describes the effect of the Request. Possible values are: Low, On User , On department, Or On Business. |
priorityName | String | Shows the importance of the Request. Possible values are: Low, Medium, High, or Urgent. |
urgencyName | String | Marks the request as urgent. Possible values are: Low, Medium, High, or Urgent. |
departmentName | String | Additional information about the ticket. |
locationName | String | Name of the Location where the service request took place. Note that Location Must Exist with same name. |
vendorName | String | Additional information about the ticket. |
customField | MAP:{key: STRING, value: OBJECT} | This key is related to custom fields. Example “customField”: {“New Dropdown”: “1”, “New Number”: 110.1,”New Text Area”: “a11”, “New Text Input”: “111”} |
Example (Request & Response)
Body
{ "requester": "adam@motadata.com", "ccEmailSet": [ "jerry@motadata.com" ], "serviceName": "Laptop", "impactName": "Low", "priorityName": "Low", "statusName": "Open", "urgencyName": "Low", "departmentName": "IT", "spam": false, "serviceCategoryName": "Hardware", "customField": { "New Checkbox": [ "y", "n" ], "New Multi-Select Dropdown": [ "W1", "W2", "W5" ] }, "name": "INC-1", "tags": [ "Laptop" ] }
Request
curl --location 'http://172.16.12.173/api/v1/service_catalog/servicerequest' \
--header 'Authorization: Apikey cuiCoIvEWMwiAa4T%40D1F5M7cRAQnXW0Wmn4D3HrdQuMYqGcVSH5oWNH4V4%2F11R%2BgTM8J2KiLNdw%3D%3D' \
--header 'Content-Type: application/json' \
--data-raw '{
"requester": "adam@motadata.com",
"ccEmailSet": [
"jerry@motadata.com"
],
"serviceName": "Laptop",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"departmentName": "IT",
"spam": false,
"serviceCategoryName": "Hardware",
"customField": {
"New Checkbox": [
"y",
"n"
],
"New Multi-Select Dropdown": [
"W1",
"W2",
"W5"
]
},
"name": "INC-1",
"tags": [
"Laptop"
]
}'
Response
{
"id": 19,
"name": "SR-15",
"createdTime": 1745489924482,
"updatedTime": 1745489925179,
"customField": {
"Laptop Specifications": ""
},
"statusName": "Open",
"createdByName": "adam",
"subject": "Request for New Laptop",
"requesterName": "Adam",
"requesterEmail": "adam@motadata.com",
"description": "Request for New Laptop",
"impactName": "Low",
"priorityName": "Low",
"urgencyName": "Low",
"updatedByName": "adam",
"source": "External",
"spam": false,
"supportLevel": "tier0"
}
- Your Request is created on returning success.