> ## Documentation Index
> Fetch the complete documentation index at: https://developer.flabslis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Referral Partners

> Look up the corporates, referring doctors and referring hospitals a branch works with, and use their IDs on CRM calls.

A lab works with three kinds of **referral partners**, each set up in the lab software and kept per branch:

* **Corporates** — companies, insurers and TPAs whose employees or members the lab serves.
* **Referral doctors** — doctors who send patients to the lab.
* **Referral hospitals** — hospitals and clinics that send patients to the lab.

These endpoints return each list with the partner's `_id` and `name`, so you can attach the right partner to a lead or booking, get that partner's negotiated prices, and (on a [party-scoped](https://developer.flabslis.com/crm/party-scoped.md) account) route webhooks per partner.

> [card] [List Corporates](https://developer.flabslis.com/crm/endpoint/list_corporates.md)
>
> `GET /client/crm/corporates`

> [card] [List Referral Doctors](https://developer.flabslis.com/crm/endpoint/list_referral_doctors.md)
>
> `GET /client/crm/doctors`

> [card] [List Referral Hospitals](https://developer.flabslis.com/crm/endpoint/list_referral_hospitals.md)
>
> `GET /client/crm/hospitals`

## Where each ID goes

| Partner | List it with | On [Create Lead or Booking](https://developer.flabslis.com/crm/endpoint/create_lead.md) | On [List Tests](https://developer.flabslis.com/crm/endpoint/list_tests.md), [List Packages](https://developer.flabslis.com/crm/endpoint/list_packages.md) and webhooks |
| - | - | - | - |
| Corporate | `GET /client/crm/corporates` | `corporateUser` | `corporateUser` |
| Referral doctor | `GET /client/crm/doctors` | `referredOrganization` | `organization` |
| Referral hospital | `GET /client/crm/hospitals` | `referredHospitalOrganization` | `organization` |

On create you can attach a corporate, a doctor and a hospital together. On tests, packages and webhook calls, pass **one** partner: `corporateUser` **or** `organization`.

## Rules to know

* **Branch scope** — every call needs a `branchID` from [List Branches](https://developer.flabslis.com/crm/endpoint/list_branches.md). Each branch has its own partners, so an ID from one branch is refused (`404`) on another.
* **Active only** — partners the lab marked inactive are not listed, and are refused if you send their ID. Temporary doctor and hospital entries are not listed either.
* **Long lists** — a large lab can have a few thousand referral doctors. Fetch the list once, keep it, and search it on your side instead of calling per keystroke.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.