POST

AppointmentBranch.List

List appointment branches for the logged-in organization. Same data as the Doctor Appointment Report branch filter and the client doctor-appointment branch dropdown (Select Branch Name). Each row includes doctor_ids / team_member for that branch.

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 AppointmentBranch 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

  • Works with staff Login bearer tokens and Customer.Login (client) bearer tokens.
  • Customer tokens are allow-listed for this read-only route only (same branches as /dashboard/client/doctor-appointment). Other staff report APIs stay staff-only.
  • Customer portal alias: Customer.Appointments.Branches (same response shape).
  • Query: branches WHERE user_id = JWT owner_id (org owner).

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
lang
post
stringenOptional language for branch name: en or he. Alias: site_lang.
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\/AppointmentBranch.List",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": [],
    "url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentBranch.List",
    "url_domain": "https:\/\/{domain}\/app\/AppointmentBranch.List"
}

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 2,
    "data": [
        {
            "id": 38,
            "branch_id": 38,
            "branch_name": "Main Branch",
            "branch_name_he": "",
            "name": "Main Branch",
            "doctor_ids": [
                23260,
                211
            ],
            "team_member": [
                23260,
                211
            ],
            "appointment_room": [
                12,
                15
            ]
        }
    ]
}

Count Only

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

{
    "url": "\/app\/AppointmentBranch.Count",
    "url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentBranch.Count",
    "url_domain": "https:\/\/{domain}\/app\/AppointmentBranch.Count",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": [],
    "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();

const res = await fetch('https://{domain}/app/AppointmentBranch.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/AppointmentBranch.List', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: new URLSearchParams() });
const branches = await res.json();
console.log(branches.data);

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}