POST

AppointmentInsuranceCompany.List

List appointment insurance companies for the Add/Edit Coupon modal dropdown and the client doctor-appointment insurance dropdown. Returns structured JSON rows instead of HTML options.

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

  • 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.
  • Works with staff Login bearer tokens and Customer.Login (client) bearer tokens.
  • Customer portal alias: Customer.Appointments.InsuranceCompanies.

Required Parameters

No body parameters are required for this function.

Optional Parameters

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

Endpoint

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

Sample Output

{
    "success": 1,
    "count": 2,
    "data": [
        {
            "id": 2,
            "name": "isreal insurance",
            "name_en": "isreal insurance",
            "customer_id": 108545,
            "customer_name": "bhavesh test 123"
        },
        {
            "id": 5,
            "name": "cloths company",
            "name_en": "cloths company",
            "customer_id": 0,
            "customer_name": ""
        }
    ]
}

Count Only

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

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

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

Error Example

{
    "success": "0",
    "error": "bearer_token_required"
}