POST
AppointmentCoupon.InsuranceAmount
When both appointment type and insurance company are selected, returns the configured insurance_price (Amount) and insurance_customer_price (Left Amount) from doctor_appointments_type.insurance_company_price JSON. Works with staff and Customer.Login tokens.
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
- Runs the AppointmentCoupon.InsuranceAmount 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
- 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.
- Customer.Login tokens are allow-listed for this read-only route. Customer portal alias: Customer.Appointments.InsuranceAmount.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
appointment_type_idpost | int | 697 | doctor_appointments_type id. Aliases: coupon_appo_type_id, appo_type_id. |
insurancepost | int | 2 | appointment_insurance_company id. Aliases: coupon_insurance_company, insurance_id. |
Optional Parameters
No optional body parameters are defined for this function.
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\/AppointmentCoupon.InsuranceAmount",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"appointment_type_id": "697",
"insurance": "2"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/AppointmentCoupon.InsuranceAmount",
"url_domain": "https:\/\/{domain}\/app\/AppointmentCoupon.InsuranceAmount"
}Endpoint
POST /app/AppointmentCoupon.InsuranceAmount
POST https://{user}.bull36.com/app/AppointmentCoupon.InsuranceAmount
POST https://{domain}/app/AppointmentCoupon.InsuranceAmountSample Output
{
"success": 1,
"message": "Success",
"amount": 100,
"left_amount": 50,
"data": {
"insurance_id": 2,
"insurance_price": 100,
"insurance_customer_price": 50,
"amount": 100,
"left_amount": 50
}
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ appointment_type_id: '697', insurance: '2' });
const res = await fetch('/app/AppointmentCoupon.InsuranceAmount', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": 0,
"message": "No insurance price configured for this appointment type"
}