POST

Support.Count

Count SUPPORT requests using the same access rules and filters as Support.List, without fetching or rendering ticket rows.

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

  • Returns only the count for Support 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

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • 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.
  • Send parameters as POST body fields exactly as documented.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
state
post
stringopenopen (default), closed, or all. Open excludes the closed/done statuses used by the dashboard.
status_ids
post
array|string546,858One or more exact status ids, comma-separated or a JSON body array. Overrides state; obtain ids from Support.Statuses.
customer_owner_id
post
int123Filter by organization owner id. Ordinary users remain restricted to their own organization.
member_id
post
int47Filter by support assignee. 0 selects unassigned tickets.
created_by
post
int47Filter by the user who created the ticket.
rating
post
int3Filter by urgency rating (1 to 5).
my_support
post
int11 filters to tickets created by or assigned to the signed-in user. Combine with state or status_ids.
search
post
stringloginSearch subject, original notes, or an exact numeric ticket id.
from_date
post
date2026-11-01Inclusive due date lower bound, YYYY-MM-DD. 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_date
post
date2026-11-30Inclusive due date upper bound, YYYY-MM-DD. 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
post
int0Zero-based row offset. Default 0.
limit
post
int25Page size, default and maximum 25. Must be positive.
order_by
post
stringlast_updatedatelast_updatedate (default), ticket_id, due_date, open_date, or rating. Ticket id breaks ties.
order_dir
post
stringDESCASC or DESC (default).

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\/Support.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN",
        "Content-Type": "application\/json"
    },
    "body": {
        "state": "open"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Support.Count",
    "url_domain": "https:\/\/{domain}\/app\/Support.Count"
}

Endpoint

POST /app/Support.Count
POST https://{user}.bull36.com/app/Support.Count
POST https://{domain}/app/Support.Count

Sample Output

{
    "success": 1,
    "count": 12
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/Support.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Support.Count",
    "url_domain": "https:\/\/{domain}\/app\/Support.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "state": "open"
    },
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "count": "Total matching accessible SUPPORT requests."
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('state', 'open');

const res = await fetch('https://{domain}/app/Support.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 = {
  "state": "open"
};

const res = await fetch('/app/Support.Count', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
  body: JSON.stringify(body)
});
const data = await res.json();
console.log(data);

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}