Hello All,
I am trying to call http://localhost/osticket/api/tickets.json Create Ticket API, when Ticket is created successfully using API, we want it should be assigned automatically to agent of department, So in order to do that , we are sending 2 extra request params as shown below departmentid and assigneeid along with that and we got these id's from below link as mentioned:-
JSON request:-
var ticketData = new
{
name = "John Doe",
email = "john.doe@example.com",
subject = "Maintenance Request",
message = "The air conditioner is not working,
IP = "",
department_id = "3", // Replace with actual department ID
assignee_id = "2" // Replace with actual user ID
};
For department ID - http://localhost/osticket/scp/departments.php?id=3
For user ID - http://localhost/osticket/scp/staff.php?id=2
Still ticket is showing as unassigned and not automatically assigned to mentioned department and assignee. please help on this how to assignee ticket using API call.
Thanks in advance.