Question

API: Create Service Item

  • 9 September 2022
  • 5 replies
  • 243 views

Userlevel 1
Badge +1

I am trying to create a service request. I can’t seem to pass along a subject or other ticket information. Is there a way to pass this as part of the service request creation call?

 

https://DOMAIN.freshservice.com/api/v2/service_catalog/items/114/place_request

 

Payload:

{
"quantity": 1,
"subject": "Useful Subject",
"email": "user@acmecorp.com",
"custom_fields":{
"partner_name" : "ACME Corp",
"partner_country" : "United States"
}
}

Response:

{
"description": "Validation failed",
"errors": [
{
"field": "subject",
"message": "Unexpected/invalid field in request",
"code": "invalid_field"
}
]
}

 


5 replies

Userlevel 5
Badge +5

Hi @thusep8652,

Greetings to you!

You wouldn’t have to add the Subject because the Subject field for Service Items are already defined at the bottom of the Service Item. I’ve added the Attachment as well - hope this helps😀

 

 

 

Userlevel 1
Badge +1

I need to customize the ticket subject before the requestor gets an e-mail of their request. 

Userlevel 5
Badge +5

Hi @thusep8652 

For a Service Request, We currently provide only these fields for now:

If you wish to change the Subject, You would have to change it in the Admin-->Service Catalog-->Service Item.

 

Otherwise, When a ticket is created, You can perform a PUT call to update the Subject of the Ticket.

Hope this helps!

Userlevel 1
Badge +1

I will have to make the additional PUT call then. Thanks

Userlevel 7
Badge +13

Hello, 

If you send out the e-mail in the workflow you can make a custom subject but if you use the system, the end user will get a “standard” mail. 

Reply