POST
Ticket.Counts
Return all, open, and closed ticket counts in one call (dashboard counts_json pills). Uses the same filters as Ticket.List; status filters are ignored so open/closed are derived from status=2 vs not.
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.Counts 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
- status / status_id / status_filter_val are stripped so All / Open / Closed stay consistent with the dashboard pills.
- Pass the same optional filters you use on Ticket.List (search, team, department, customer, phone, address, dates).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
typepost | string | my_tickets | Ticket bucket: my_tickets (default, Biz1 Support) or company_tickets (Customers Tickets). |
searchhpost | string | payment | Search ticket id, subject, customer name, email, phone, mobile. Aliases: search, filter_data, search[value]. |
team_memberpost | array|string | 47,48 | Assigned team member filter. Aliases: team_member_id, assign_member_id. |
departmentpost | array|string | 2 | Department ids to include. |
customer_idpost | int | 123 | Only tickets for this customer. Alias: cust_id. |
phonepost | string | 0500000000 | Search phone and mobile fields. |
addresspost | string | Main street | Search address text. |
from_datepost | date | 2026-07-01 | Open date range start, inclusive. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
to_datepost | date | 2026-07-31 | Open date range end, inclusive. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
start_date_of_Duepost | date | 2026-07-01 | Due date range start, inclusive. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
end_date_of_Duepost | date | 2026-07-31 | Due date range end, inclusive. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Ticket.Counts",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"type": "my_tickets",
"searchh": "payment",
"phone": "0500000000",
"from_date": "2026-07-01",
"to_date": "2026-07-31"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.Counts",
"url_domain": "https:\/\/{domain}\/app\/Ticket.Counts"
}Endpoint
POST /app/Ticket.Counts
POST https://{user}.bull36.com/app/Ticket.Counts
POST https://{domain}/app/Ticket.CountsSample Output
{
"success": 1,
"all": 42,
"open": 30,
"closed": 12
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ type: 'my_tickets', searchh: 'payment', phone: '0500000000' });
const res = await fetch('/app/Ticket.Counts', { 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"
}