POST
Ticket.Department
List ticket departments for the logged-in account (ticket_department table, same source as dashboard setting listing_of_ticket_departmentp_table and the Add Ticket CHOICE DEPARTMENT dropdown). Returns JSON rows with id, name, and team members. Alias: Ticket.DepartmentList. Related: Ticket.DepartmentGet, Ticket.DepartmentAdd, Ticket.DepartmentEdit, Ticket.DepartmentDelete.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Runs the Ticket.Department function and returns JSON.
Push Service
No push is sent because this function only reads data or returns helper information.
Automation
No automation is run for this function.
Special Instructions
- Dashboard Ticket Settings step 1 (Departments) and Add Ticket department dropdown.
- Optional paging/search only — no body parameters required for a full list.
- Write actions: DepartmentAdd / Edit / Delete (manager).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
pagepost | int | 1 | Page number (1-based). |
limitpost | int | 100 | Max rows (capped at 100). Aliases: per_page, length. |
startpost | int | 0 | Row offset. |
searchpost | string | support | Filter by department name. Aliases: searchh, name. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Ticket.Department",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"limit": "100"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.Department",
"url_domain": "https:\/\/{domain}\/app\/Ticket.Department"
}Endpoint
POST /app/Ticket.Department
POST https://{user}.bull36.com/app/Ticket.Department
POST https://{domain}/app/Ticket.DepartmentSample Output
{
"success": 1,
"count": 2,
"total": 2,
"source": "mysql.ticket_department",
"data": [
{
"id": 12,
"department_id": 12,
"name": "test new department 12",
"team_member_ids": [
14,
47
],
"team_members": [
{
"id": 14,
"name": "user"
}
]
}
]
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('limit', '100');
const res = await fetch('/app/Ticket.Department', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": "0",
"error": "bearer_token_required",
"message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}