Associating an Asset to a Service Request ticket using ticket update Api

Hai guys,

Hope you guys are doing well.
I have a requirement where i need to associate an asset to an existing Service Request ticket in Freshservice.

Using V2 API
Found that this cannot be achieved using the Freshservice V2. Since V2 Api only has Api’s to create/update incident ticket not service requests.

Using V1 API
Tried using the v1 api had been getting the following error.
Request URL
https://testman.freshservice.com/helpdesk/tickets/13.json
Request Method
PUT
Body

{
  "helpdesk_ticket": {
     "priority": 3,
     "status": 2
  },
  "associate_ci": {
      "serial_no": "FRSHW1234",
      "name": "Apple MacBook Air 13",
      "user": "testman@gmail.com"
  }
}

Response

{
"description": "Validation failed",
"errors": [
{
"field": "type",
"message": "It should be one of these values: 'Incident'",
"code": "invalid_value"
}]
}

Let me know if i am making any mistake anywhere and if not is there any workaround available for this

Regards,
Sarfaraz

You can only create service request now in version 2 APIs. Neither v1, nor v2 supports updating a service request, therefore you can’t associate an asset to an existing service request ticket.

4 Likes

Thank you @yusrakhatri

1 Like