I’m trying a solution via API to update the visibility of a selected ticket field, hiding it from the ticket screen. However, with the APIs I tried, I couldn’t find a solution.
For this I am trying to use the following API: [PUT] /api/v2/admin/ticket_fields/[ticket_fields_id]
Searching, I managed to locate this variable that in theory hides the item from the portal, but when I run this command, it returns an error in the request, so I believe I must be doing something wrong when sending this JSON.
{
“visible_in_portal”: false
}
I’ve also tried using this object, but I wasn’t successful either:
{
“visibility”: {
“agent”: false,
“customer”: false
}
}
Another API I also tried was options: [PUT] /api/v2/admin/ticket_fields/[ticket_fields_id]/options
However, when running I also get a 404 error return, so I believe that this request no longer exists in this current version.
{
“options”: [
{ “value”: “Option1”, “label”: “Option 1” },
{ “value”: “Option4”, “label”: “Option 4” }
]
}
{
“options”: [
{ “value”: “option1”, “label”: “Option 1”, “visible_in_portal”: true },
{ “value”: “option2”, “label”: “Option 2”, “visible_in_portal”: false },
{ “value”: “option3”, “label”: “Option 3”, “visible_in_portal”: true }
]
}
Has anyone ever had to develop something similar to this?
And I would also like to know how to inject javascript code into a ticket page to manage ticket field tabs.