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.
  • 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.
  • 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
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\/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.List

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