Appointments.List
List staff CRM doctor appointments (doctor_appointment_for_cust) for the weekly/daily/monthly calendar. Filter by date range, branch, doctor, appointment type, customer, branch_status (0=Came to branch, 1=Enter, 2=Finished), cancel/paid status, and search. Staff token only — does not replace Customer.Appointments.List.
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 Appointments rows as JSON.
- Supports the documented filters and paging fields.
- List responses are capped at 25 rows per call.
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.
- Staff/org Bearer token required. Customer portal uses Customer.Appointments.* instead.
- Respects Settings → Branches (show_branches_status): ON lists branch>0 rows; OFF lists branch=0 rows. Response includes show_branches_status.
- branch_id filter applies only when Branches module is ON.
- Default excludes cancelled (cancle_status=0). Pass include_cancelled=1 to include cancelled.
- branch_status: 0=Came to branch (green), 1=Enter (orange), 2=Finished (blue).
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
from_datepost | date | 2026-10-11 | Range start Y-m-d. Alias: start_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. |
to_datepost | date | 2026-10-17 | Range end Y-m-d. Alias: end_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. |
datepost | date | 2026-10-13 | Exact date filter (overrides range). 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. |
branch_idpost | int | 38 | Branch id (calendar branch_2 dropdown). Aliases: branch, login_user_branch. |
doctor_idpost | string | 211 | Team member / doctor id. Also accepts doctor_ids JSON/array. |
appointment_type_idpost | int | 699 | Service/type filter (tag row). Alias: appointments_type_id. |
customer_idpost | int | 1443 | Customer id. Alias: cust_id. |
branch_statuspost | int | 0 | 0=Came to branch, 1=Enter, 2=Finished. |
cancle_statuspost | int | 0 | 0=active, 1=cancelled. Alias: cancel_status. |
include_cancelledpost | int | 0 | 1 = include cancelled when cancle_status not set. |
paid_statuspost | int | 0 | Optional paid filter. |
searchpost | string | Alpha | Search customer/patient name, phone, notes, subject. Alias: cust_name. |
startpost | int | 0 | Offset. |
limitpost | int | 100 | Page size, max 500. |
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\/Appointments.List",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"from_date": "2026-10-11",
"to_date": "2026-10-17",
"branch_id": "38",
"limit": "100"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Appointments.List",
"url_domain": "https:\/\/{domain}\/app\/Appointments.List"
}Endpoint
POST /app/Appointments.List
POST https://{user}.bull36.com/app/Appointments.List
POST https://{domain}/app/Appointments.ListSample Output
{
"success": 1,
"count": 1,
"data": [
{
"id": 6550636,
"date": "2026-10-13",
"start_time": "09:00",
"end_time": "09:30",
"doctor_id": 211,
"branch_id": 38,
"branch_status": 0,
"branch_status_label": "came_to_branch",
"appointment_type_id": 699,
"customer_id": 1443,
"cancle_status": 0
}
]
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Appointments.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Appointments.Count",
"url_domain": "https:\/\/{domain}\/app\/Appointments.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"from_date": "2026-10-11",
"to_date": "2026-10-17",
"branch_id": "38"
},
"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('from_date', '2026-10-11');
body.set('to_date', '2026-10-17');
body.set('branch_id', '38');
const res = await fetch('https://{domain}/app/Appointments.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();
body.set('from_date', '2026-10-11');
body.set('to_date', '2026-10-17');
body.set('branch_id', '38');
body.set('limit', '100');
const res = await fetch('/app/Appointments.List', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"error": "client_token_not_allowed"
}