POST
AppointmentType.List
List doctor appointment types for the Add/Edit Coupon modal dropdown. Same doctor_appointments_type rows as the dashboard, ordered by type_order then name.
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 AppointmentType 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.
- 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.
- 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
| Name | Type | Sample | What it gives |
|---|---|---|---|
limitpost | int | 25 | Maximum rows to return. Values above 25 are capped. |
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\/AppointmentType.List",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentType.List",
"url_domain": "https:\/\/{domain}\/app\/AppointmentType.List"
}Endpoint
POST /app/AppointmentType.List
POST https://{user}.bull36.com/app/AppointmentType.List
POST https://{domain}/app/AppointmentType.ListSample Output
{
"success": 1,
"count": 2,
"data": [
{
"id": 697,
"name": "Consultation",
"time": 30,
"price": 100,
"color": "#ffa500"
},
{
"id": 698,
"name": "Follow up",
"time": 15,
"price": 50,
"color": "#2f80ed"
}
]
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/AppointmentType.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentType.Count",
"url_domain": "https:\/\/{domain}\/app\/AppointmentType.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/AppointmentType.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/AppointmentType.List', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body: new URLSearchParams() });
console.log(await res.json());Error Example
{
"success": "0",
"error": "bearer_token_required"
}