POST
Customer.Tickets.List
List this customer's tickets. Same query as dashboard/client/tickets paginate: tickets.status=1, type=my_tickets, cust_id=token c_id. Default order ticket_id DESC. Page size capped at 25 (dashboard uses 15).
Permissions
- User must be logged in with a valid bearer token.
- The user must be from the same company domain as the request Host (call the API on that account subdomain or allowed custom domain). A token from another company returns success=0, error user_not_in_company.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Runs the Customer.Tickets.List 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
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- Requires Customer.Login token. Staff Ticket.List is a different route and stays staff-only.
- show=1 open tickets, show=0 closed (tickets.show). Omit show for all.
- searchh filters subject LIKE, same as the dashboard search box.
- sort=ASC or sort=DESC orders by open_date; default is ticket_id DESC.
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
showpost | int | 1 | 1 = open, 0 = closed. Omit for all. |
searchhpost | string | payment | Search subject. Aliases: search, filter_data. |
sortpost | string | DESC | ASC or DESC on open_date. Empty = ticket_id DESC. |
pagepost | int | 1 | 1-based page. page 0 or 1 is the first page, same as dashboard. |
startpost | int | 0 | Row offset. Used when sent; otherwise page is used. |
limitpost | int | 15 | Page size, capped at 25. Aliases: length, per_page. |
Authentication
Send the bearer token returned by Login in the request header. The user must be from the same company domain as this Host — a token from another company is rejected (user_not_in_company).
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Customer.Tickets.List",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"show": "1",
"limit": "15"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Tickets.List",
"url_domain": "https:\/\/{domain}\/app\/Customer.Tickets.List"
}Endpoint
POST /app/Customer.Tickets.List
POST https://{user}.bull36.com/app/Customer.Tickets.List
POST https://{domain}/app/Customer.Tickets.ListSample Output
{
"success": 1,
"count": 2,
"data": [
{
"ticket_id": 900,
"subject": "Payment issue",
"type": "my_tickets",
"show": 1,
"messages": []
}
]
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Customer.Tickets.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Tickets.Count",
"url_domain": "https:\/\/{domain}\/app\/Customer.Tickets.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"show": "1"
},
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"count": "Use the matching count route when available, or count returned rows.",
"max_limit": 25
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('show', '1');
const res = await fetch('https://{domain}/app/Customer.Tickets.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);JavaScript Example
const body = new URLSearchParams({ show: '1', limit: '15' });
const res = await fetch('/app/Customer.Tickets.List', { method: 'POST', headers: { Authorization: 'Bearer YOUR TOKEN' }, body });
console.log(await res.json());Error Example
{
"success": 0,
"error": "customer_login_required"
}