POST
Ticket.Count
Return only the number of visible tickets matching the same filters used by Ticket.List. Default type is my_tickets (dashboard Biz1 Support). Send type=company_tickets for Customers Tickets. Use this before loading pages when the UI only needs a total.
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
- Returns only the count for Ticket using the same filters as the list function.
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
- Same optional filters as Ticket.List (inherited below). No body parameters are required.
- For All / Open / Closed dashboard pills use Ticket.Counts instead of this route.
- Default type is my_tickets when type is omitted.
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 table) or company_tickets (Customers Tickets). When omitted, my_tickets is used so the count matches the dashboard main tickets list. |
startpost | int | 0 | First row offset for paging. |
limitpost | int | 25 | Maximum number of rows. Values above 25 are capped to 25. You may also send length or per_page. |
pagepost | int | 1 | Alternative page number. Used only when start is not sent. |
searchhpost | string | payment | Search ticket id, subject, customer name, email, phone, and mobile. You may also send search, filter_data, or search[value]. |
status_filter_valpost | array|string | 1,3 | Status ids to include. You may also send status_id or status. |
team_memberpost | array|string | 47,48 | Assigned team member filter. You may also send team_member_id or assign_member_id. |
departmentpost | array|string | 2 | Department ids to include. |
customer_idpost | int | 123 | Only tickets connected to this customer. You may also send 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. |
tickets_id_sortpost | string | DESC | Sort ticket id ASC or DESC. You may also send sort or order_dir. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Ticket.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"type": "my_tickets",
"searchh": "payment",
"status_filter_val": "1,3"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.Count",
"url_domain": "https:\/\/{domain}\/app\/Ticket.Count"
}Endpoint
POST /app/Ticket.Count
POST https://{user}.bull36.com/app/Ticket.Count
POST https://{domain}/app/Ticket.CountSample Output
{
"success": 1,
"count": 10,
"total_record": 10
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Ticket.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.Count",
"url_domain": "https:\/\/{domain}\/app\/Ticket.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"type": "my_tickets",
"searchh": "payment",
"status_filter_val": "1,3"
},
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"count": "Total tickets matching the sent filters.",
"total_record": "Same total for clients that read total_record."
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('type', 'my_tickets');
body.set('searchh', 'payment');
body.set('status_filter_val', '1,3');
const res = await fetch('https://{domain}/app/Ticket.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ searchh: 'payment' });
const res = await fetch('/app/Ticket.Count', {
method: 'POST',
headers: { Authorization: 'Bearer ' + token },
body
});
const data = await res.json();
console.log(data.count);Error Example
{
"success": "0",
"error": "bearer_token_required",
"message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}