Question

Additional supported attributes to create a fresh service ticket


Badge

Hi,

We are trying to create fresh service tickets using mulesoft. We are using freshservice sandbox environment to create tickets. So far we are able to create ticket using the below attributes.

"subject" 
"description" 
"email"
"priority"
"status"
"custom_fields" : {
   "application" 
  }

We found additional attributes in the api specification https://api.freshservice.com/#create_ticket and tried to pass the below attributes in the payload with the given data specifications in link.

"group_id"
 "department_id"
 "category"
 "sub_category"
 "item_category"

But we are getting the below error and would like know the supported attributes in the payload.

"Errortype": {
      "identifier": "BAD_REQUEST",
      "parentErrorType": {
        "identifier": "ANY",
        "namespace": "MULE"
      }

 

Let me know if I need to provide any other details. Any help is appreciated.

 

Thanks,

John Linu


3 replies

Userlevel 7
Badge +13

You send the API key with the POST? 
Please post the correct JSON body you are trying to post ( use the code text format tool, it’s under the … ) 
Like this 

POST site.freshservice.com/api/v2/tickets

{
"description": "This is a test submitted via API...",
"subject": "Testing, please ignore",
"email": "anybody@nowhere.com",
"priority": 1,
"status": 2,
"cc_emails": [
"nobody@nowhere.com"
]
}


I would recommend testing with example the application Postman first. 

Userlevel 3
Badge +4

@johnlinu 

Sample pay load
To get the group_id and all, create a test ticket ID frame the URL like this https://myarchives.freshservice.com/api/v2/tickets/1368 get the values  and use the payload as mentioned below




{

"description": "Details about the issue...",

"subject": "Support Needed...",

"email": "tom@outerspace.com",

"priority": 1,

"status": 2,

"group_id":75000092644,

"responder_id":120000263201,

"category":"Network",

"sub_category":"Access",

"item_category":null,

"cc_emails": [

"ram@freshservice.com",

"diana@freshservice.com"

]

}

Feel free to reach out for further help.

Cheers
J

Badge

Thank you all for the prompt replies on my issue. I am able to pass groupid, deptid, category through payload. Some how sub_category is not accepted in payload as it is saying value is not expected. But as per our requirement we are good with the above mentioned 3 attributes.

Reply