Answered

"business_name" validation error on create new ticket api call

I tried to post a new ticket via api but error happened. Did I do something wrong?


Best Answer

The "business_name" appears to be a custom field and hence has to be within a "custom_fields" block. We have an example in the documentation that shows the appropriate format.


curl -v -u user@yourcompany.com:test -H "Content-Type: application/json" -d '{ "description": "Details about the issue...", "subject": "Support Needed...", "email": "tom@outerspace.com", "priority": 1, "status": 2, "cc_emails": ["ram@freshdesk.com","diana@freshdesk.com"], "custom_fields" : { "category" : "Primary" } }' -X POST 'https://domain.freshdesk.com/api/v2/tickets'


Take a look at the second example at the link for more details - http://developers.freshdesk.com/api/#create_ticket 

1 Comment

Answer

The "business_name" appears to be a custom field and hence has to be within a "custom_fields" block. We have an example in the documentation that shows the appropriate format.


curl -v -u user@yourcompany.com:test -H "Content-Type: application/json" -d '{ "description": "Details about the issue...", "subject": "Support Needed...", "email": "tom@outerspace.com", "priority": 1, "status": 2, "cc_emails": ["ram@freshdesk.com","diana@freshdesk.com"], "custom_fields" : { "category" : "Primary" } }' -X POST 'https://domain.freshdesk.com/api/v2/tickets'


Take a look at the second example at the link for more details - http://developers.freshdesk.com/api/#create_ticket 

Login or Signup to post a comment