POST

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

NameTypeSampleWhat it gives
from_date
post
date2026-10-11Range 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_date
post
date2026-10-17Range 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.
date
post
date2026-10-13Exact 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_id
post
int38Branch id (calendar branch_2 dropdown). Aliases: branch, login_user_branch.
doctor_id
post
string211Team member / doctor id. Also accepts doctor_ids JSON/array.
appointment_type_id
post
int699Service/type filter (tag row). Alias: appointments_type_id.
customer_id
post
int1443Customer id. Alias: cust_id.
branch_status
post
int00=Came to branch, 1=Enter, 2=Finished.
cancle_status
post
int00=active, 1=cancelled. Alias: cancel_status.
include_cancelled
post
int01 = include cancelled when cancle_status not set.
paid_status
post
int0Optional paid filter.
search
post
stringAlphaSearch customer/patient name, phone, notes, subject. Alias: cust_name.
start
post
int0Offset.
limit
post
int100Page 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.List

Sample 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"
}