POST

AppointmentDoctorReport.List

Doctor appointment matrix report (Advance → Appointment Doctor Report). Returns doctors, appointment types, per-cell appointment_count/total_cost, column totals, and pie chart series. Same filters as the dashboard: from_date, to_date, branch_id, doctor_ids. Load branch options first with AppointmentBranch.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 AppointmentDoctorReport 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

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.
  • For paging, do not request more than 25 rows.
  • For total rows, call the matching Count function with the same filters.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
from_date
post
date2026-08-01Appointment date from (Y-m-d). 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-08-31Appointment date to (Y-m-d). 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
string38Filter appointment types that include this branch id.
doctor_ids
post
json[23260,211]Optional doctor/team member ids. JSON array, comma list, or dashboard double-encoded JSON.
limit
post
int25Maximum rows to return. Values above 25 are capped.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/AppointmentDoctorReport.List",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "from_date": "2026-08-01",
        "to_date": "2026-08-31"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentDoctorReport.List",
    "url_domain": "https:\/\/{domain}\/app\/AppointmentDoctorReport.List"
}

Endpoint

POST /app/AppointmentDoctorReport.List
POST https://{user}.bull36.com/app/AppointmentDoctorReport.List
POST https://{domain}/app/AppointmentDoctorReport.List

Sample Output

{
    "success": 1,
    "doctors": [
        {
            "id": 23260,
            "name": "Dr. A"
        }
    ],
    "matrix": [
        {
            "type_id": 697,
            "type_name": "Consultation",
            "cells": [
                {
                    "doctor_id": 23260,
                    "appointment_count": 3,
                    "total_cost": 150
                }
            ]
        }
    ],
    "totals": [
        {
            "doctor_id": 23260,
            "total_cost": 150,
            "total_appointments": 3
        }
    ],
    "pie_doctor_series": [],
    "pie_type_series": []
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/AppointmentDoctorReport.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentDoctorReport.Count",
    "url_domain": "https:\/\/{domain}\/app\/AppointmentDoctorReport.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "from_date": "2026-08-01",
        "to_date": "2026-08-31"
    },
    "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-08-01');
body.set('to_date', '2026-08-31');

const res = await fetch('https://{domain}/app/AppointmentDoctorReport.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({ from_date: '2026-08-01', to_date: '2026-08-31' });
const res = await fetch('/app/AppointmentDoctorReport.List', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
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"
}