POST
CustomerStatuses.Count
Return only the count of Customer Statuses matching CustomerStatuses.List filters.
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 CustomerStatuses 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
- Use CustomerStatuses.* for the Customer Statuses settings screen. Statuses.* is for all_status buckets only (ticket, internal_status, customer_status per folder, etc.).
- Custom add/edit uses dashboard fields: name, old_name, status_color.
- Default edit uses dashboard fields: cust_dynamic_name_id, name_for, cust_name_en, cust_name_he, status_color.
- Delete uses dashboard field data_name. Default statuses cannot be deleted (can_delete=false).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
searchpost | string | active | Search name_en, name_he, name_for. Aliases: filter_data, search[value], name. |
startpost | int | 0 | First row offset. Alias: offset. |
limitpost | int | 25 | Maximum rows (capped at 25). Aliases: length, per_page. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/CustomerStatuses.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"url_user": "https:\/\/{user}.bull36.com\/app\/CustomerStatuses.Count",
"url_domain": "https:\/\/{domain}\/app\/CustomerStatuses.Count"
}Endpoint
POST /app/CustomerStatuses.Count
POST https://{user}.bull36.com/app/CustomerStatuses.Count
POST https://{domain}/app/CustomerStatuses.CountSample Output
{
"success": 1,
"count": 8,
"total_record": 8,
"source": "customer_statuses"
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/CustomerStatuses.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/CustomerStatuses.Count",
"url_domain": "https:\/\/{domain}\/app\/CustomerStatuses.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"route": "CustomerStatuses.Count"
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
const res = await fetch('https://{domain}/app/CustomerStatuses.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);JavaScript Example
const token = 'YOUR TOKEN';
const res = await fetch('/app/CustomerStatuses.Count', { method: 'POST', headers: { Authorization: 'Bearer ' + token } });
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"
}