POST
DocumentStatuses.Count
Count document_status rows with the same filters as DocumentStatuses.List.
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 DocumentStatuses 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 DocumentStatuses.* for the Document Status settings popup. Statuses.* is all_status. CustomerStatuses.* is customer folder statuses.
- These statuses are used on documents.user_status (e.g. purchase orders / proposals). Filter documents with Documents.List user_status / status_id.
- Owner or member-admin only (settings manager).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
type_forpost | string | purchase_orders | Optional. Dashboard default type_for is purchase_orders. Omit or send all for every type. Aliases: document_status_type, type. |
searchpost | string | Shipped | Search name_en, name_he, type_for. |
startpost | int | 0 | Paging offset. |
limitpost | int | 25 | Page size (max 25). |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/DocumentStatuses.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"limit": "25"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/DocumentStatuses.Count",
"url_domain": "https:\/\/{domain}\/app\/DocumentStatuses.Count"
}Endpoint
POST /app/DocumentStatuses.Count
POST https://{user}.bull36.com/app/DocumentStatuses.Count
POST https://{domain}/app/DocumentStatuses.CountSample Output
{
"success": 1,
"count": 3,
"total_record": 3
}JavaScript Example
const token = 'YOUR TOKEN';
const res = await fetch('/app/DocumentStatuses.Count', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: new URLSearchParams() });
console.log(await res.json());Error Example
{
"success": 0,
"message": "permission denied"
}