Hi Waseem
Could you please try the below method and let me know if that works?
curl -u user@yourcompany.com:test -H "Content-Type: application/json" -d '{ "helpdesk_ticket": { "description": "Details about the issue...", "subject": "Support Needed...", "email": "tom@outerspace.com", "priority": 1, "status": 2 }, "associate_ci":{"serial_no":"ABC12345","name":"my printer","user":"rachel@freshdesk.com"} }' -X POST http://domain.freshservice.com/helpdesk/tickets.json
Regards
Radha
Dear Rada,
I suppose that method will create a ticket and an asset "My printer", then assign that asset to the ticket.
I have tried it, it creates a ticket successfully without errors, but it does't create the asset "my printer".
However, I need to assign an existed asset to the ticket.
Best,
Waseem
Hi Waseem
The code will not create an asset. It will create a ticket and link an existing asset that exist in your inventory.
In the above code, please mention the existing asset's serial number, name and used by details.
Will be glad to get on a call and help.
Regards
Radha
Thank you for your help, it is working fine now :)
Waseem
Thanks for the confirmation Waseem.
Please let me know for any further queries or assistance. Will be glad to help.
Have a great time ahead !
Thanks & Regards
Radha
I am getting same error message. How this was resolved please?
Hello Avni,
Could you please help me with the error message that you're getting while running this command? Also let me know the command that you're trying so that we can analyse further?
Regards
Suvashini
Hi Amutha,
You can construct a script to include payload like below,
{ "helpdesk_ticket": { "description": "Details about the issue...", "subject": "Support Needed...", "email": "tom@outerspace.com", "priority": 1, "status": 2 }, "associate_ci":{"serial_no":"C1MN8BGUDTY3"} }
The serial number is a mandatory field to associate a CI to a Ticket. Also, currently we only support default CI type Hardware to be associated with a Ticket. So, please verify if your code supports the same.
If still you are encountering issues around this please raise a support ticket and we are happy to assist with it.
Hi Thushan,
I raised a support ticket for the same and the issue is resolved. Since I am using v2.0 APIs, I used the below script to associate an asset with a ticket:
{"ticket":{"description":"Testing from Java ...","subject":"JAVA Support needed..","email":"amutha.ganga@erasmith.com","priority":4,"status":2,"type":"Incident","associate_ci":{"name":"Era Desktop"}}}
Thanks for your time.