POST
Customer.Count
Return only the number of customers matching the same filters used by Customer.List.
Permissions
- User sees only customers allowed by account permissions, team access, folder access, and sharing rules.
Action
- Returns customer rows with filters and paging.
- Caps page size to 25.
- Returns total/count fields when available.
Push Service
No push is sent because this is a read method.
Automation
No automation is run because this is a read method.
Special Instructions
- For total rows, call Customer.Count with the same filters.
- Keep length, limit, or per_page at 25 or less.
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
startpost | int | 0 | First row offset for paging. |
lengthpost | int | 25 | Maximum number of rows to return. Values above 25 are capped to 25. |
drawpost | int | 1 | Optional datatable draw counter. |
search[value]post | string | john | Datatable search text. |
filter_datapost | string | john | Search text or filter value supported by the customer list. |
show_sub_customer_on_checkpost | int | 0 | When 1, includes sub-customers in the list when allowed. |
include_trash_customerpost | int | 0 | Includes archived customers when set to 1. Default list keeps archive = 0. |
get_folder_wise_clientpost | mixed | 1 | Folder filter value for customer lists. |
check_fields_of_folderpost | int | 1 | Optional flag used together with folder filters. |
folder_idpost | int | 1 | Customer folder/status filter when used by the account. |
folderpost | mixed | 1,2 | One or more folder ids for customer folder filtering. |
status_idpost | int | 1 | Filters by customer status when the account uses status_id. |
get_status_wise_clientpost | mixed | 1 | Customer status filter value. |
status_wise_client_newpost | mixed | 1 | Folder status filter value. |
internal_status_wise_client_newpost | mixed | 1 | Folder sub-status filter value. |
tagpost | string | 1 | Filters by one or more customer tag ids when supported. |
sourcepost | string | website | Filters by lead/customer source. |
team_member_idpost | int | 24209 | Dashboard "Team member" filter. Matches contactus.shared_with LIKE %"id"% (same as total_filters_fields=shared_with). Aliases: get_shared_with_wise_client, get_shared_with_wise_client_new. |
get_customer_manager_wise_client_newpost | mixed | 47 | Dashboard customer-manager filter. Matches contactus.customer_manager. Alias: customer_manager_id. |
get_shared_with_wise_clientpost | mixed | 24209 | Same as team_member_id: filter customers shared with this team member id. |
get_shared_with_wise_client_newpost | mixed | 24209 | Same as team_member_id / get_shared_with_wise_client. |
get_campaigns_wise_clientpost | mixed | 123 | Campaign customer filter value. |
from_datepost | date | 2026-07-01 | Filters customers created or updated from this date when the list supports date filtering. 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-17 | Filters customers created or updated until this date when the list supports date filtering. 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. |
date_fieldpost | string | date_created | Date column selector for from_date/to_date. Supports date_created, last_updated, updated, followup, and date_of_due. |
created_frompost | date | 2026-07-01 | Filters customers created from this date. 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. |
created_topost | date | 2026-07-17 | Filters customers created until this date. 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. |
updated_frompost | date | 2026-07-01 | Filters customers updated from this date. 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. |
updated_topost | date | 2026-07-17 | Filters customers updated until this date. 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. |
extra_fields[field_name]post | mixed | gold | Filters by a customer custom field when supported. Replace field_name with a key from User.Basic field_settings.customer.extra_fields. |
custom_fieldpost | string | vip_level | Custom field name for list filtering when the dashboard list accepts custom_field/custom_field_value. |
custom_field_valuepost | mixed | gold | Custom field value paired with custom_field. |
order[0][column]post | int | 0 | Datatable column index to order by when supported by the customer list. |
order[0][dir]post | string | desc | Order direction: asc or desc. |
limitpost | int | 25 | Maximum number of rows to return. Values above 25 are capped to 25. |
per_pagepost | int | 25 | Alternative page-size field. Values above 25 are capped to 25. |
searchpost | string | john | Search text for list routes when supported. |
order_bypost | string | date_created | Column/key to order by when supported. |
sortpost | string | date_desc | Sort preset when supported. |
order_dirpost | string | desc | Order direction: asc or desc. |
tag_idpost | mixed | 1 | Tag id filter when the list supports tags. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Customer.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"filter_data": "john",
"folder_id": "1"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Count",
"url_domain": "https:\/\/{domain}\/app\/Customer.Count"
}Endpoint
POST /app/Customer.Count
POST https://{user}.bull36.com/app/Customer.Count
POST https://{domain}/app/Customer.CountSample Output
{
"success": 1,
"count": 123
}Fail Response
{
"success": 0,
"message": "Bearer token is required"
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Customer.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Count",
"url_domain": "https:\/\/{domain}\/app\/Customer.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"filter_data": "john",
"folder_id": "1"
},
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"count": "Total customers matching the sent filters."
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('filter_data', 'john');
body.set('folder_id', '1');
const res = await fetch('https://{domain}/app/Customer.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({
start: '0',
length: '25',
folder_id: '1'
});
const res = await fetch('/app/Customer.List', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
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"
}