Skip to main content

Pass company ID in ticket API?

  • August 17, 2017
  • 3 replies
  • 33 views

When you create a ticket with the FreshService API, is there a way to open a ticket for a specific company ID? I've tried passing the ID with both company_id and department_id but it never opens the ticket or creates the customer under the proper company.

This topic has been closed for replies.

3 replies

suvashini.balashanmugam
Forum|alt.badge.img+4

Hi Alex,


Hope you are doing well.


You should be able to create a ticket with the Company/Department value in the ticket. Can you please try the following command and let us know if you face any issues in creating a ticket with Department/Company ?


curl -u suvashini@test.com:test -H "Content-Type: application/json" -d '{"helpdesk_ticket":{"description":"Some details on the issue ...", "subject":"Support needed..","email":"suvashini@test.com","priority":1, "status":2, "source":2,"ticket_type":"Incident","department_id":1000130588},

"cc_emails":"superman@marvel.com,avengers@marvel.com"}' -X POST https://domain.freshservice.com/helpdesk/tickets.json


Please pass the company ID as "department_id":1000130588 mentioned in the above command.


Let me know if you need clarification!


Many thanks

Suvashini


  • Apprentice
  • September 28, 2018

How do I get the numbers for the departments in my portal?



govind.sudarsan
Contributor

Hi Dan,


You can use the API to view the list of departments, https://api.freshservice.com/#view_all_department to find the Department ID of each department. Let us know if you have any difficulties with the same.