POST
Customer.Appointments.Branches
List org branches for the logged-in customer (same as client doctor-appointment Select Branch Name). Same response shape as 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
- Runs the Customer.Appointments.Branches function and returns JSON.
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
- Requires Customer.Login token. Staff AppointmentBranch.List is unchanged and also accepts customer tokens for this read-only branch list.
- Source: branches WHERE user_id = org owner (contactus / JWT owner_id), same as get_doctor_appointment_for_cust_branch_on.php.
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
langpost | string | en | Optional. en or he for branch name. Alias: site_lang. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Customer.Appointments.Branches",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Appointments.Branches",
"url_domain": "https:\/\/{domain}\/app\/Customer.Appointments.Branches"
}Endpoint
POST /app/Customer.Appointments.Branches
POST https://{user}.bull36.com/app/Customer.Appointments.Branches
POST https://{domain}/app/Customer.Appointments.BranchesSample Output
{
"success": 1,
"count": 1,
"data": [
{
"id": 2,
"branch_id": 2,
"branch_name": "branch_2",
"name": "branch_2",
"doctor_ids": [
14,
211
],
"team_member": [
14,
211
],
"appointment_room": [
1,
2
]
}
]
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
const res = await fetch('/app/Customer.Appointments.Branches', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"error": "customer_login_required"
}