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

# Leads and referrals

> Lead records and referral agencies

### GET /Leads

**Example:** `GET /leads?leadType=CLIENT&leadId=328`

**Query parameters:**

| Parameter        | Default | Description                         |
| ---------------- | ------- | ----------------------------------- |
| `leadId`         | -       | Returns a single lead               |
| `leadType`       | -       | Filter by type: `CARER` or `CLIENT` |
| `includeDeleted` | -       | Returns deleted leads               |

**Response fields:**

| Field                     | Type        | Notes                   |
| ------------------------- | ----------- | ----------------------- |
| `LeadId`                  | integer     |                         |
| `LeadStatus`              | null/string |                         |
| `LeadSource`              | string      |                         |
| `LeadType`                | string      | `"CLIENT"` or `"CARER"` |
| `Title`                   | string      |                         |
| `FirstName`               | string      |                         |
| `LastName`                | string      |                         |
| `MiddleName`              | string      |                         |
| `PreferredName`           | string      |                         |
| `Area`                    | string      |                         |
| `Division`                | string      |                         |
| `Groups`                  | string      |                         |
| `Type`                    | string      |                         |
| `CaseManager`             | string      | Email                   |
| `Address1`                | string      |                         |
| `Address2`                | string      |                         |
| `Suburb`                  | string      |                         |
| `State`                   | string      |                         |
| `Postcode`                | string      |                         |
| `Phone`                   | string      |                         |
| `Mobile`                  | string      |                         |
| `Email`                   | string      |                         |
| `ContactPref`             | string      |                         |
| `DOB`                     | string      | Date                    |
| `Gender`                  | string      |                         |
| `Marital`                 | string      |                         |
| `Vacancy`                 | string      |                         |
| `NDISNo`                  | string      |                         |
| `NDISAspirations`         | string      |                         |
| `MyAgedCareReference`     | string      |                         |
| `MACCode`                 | string      |                         |
| `MedicareNo`              | string      |                         |
| `AmbulanceNo`             | string      |                         |
| `PensionNo`               | string      |                         |
| `Aboriginal`              | integer     | 0/1                     |
| `TSI`                     | integer     | 0/1                     |
| `LGBQTI`                  | integer     | 0/1                     |
| `ATSI`                    | integer     | 0/1                     |
| `CALD`                    | integer     | 0/1                     |
| `InterpreterRequired`     | integer     | 0/1                     |
| `AssistiveTechnology`     | integer     | 0/1                     |
| `Auslan`                  | integer     | 0/1                     |
| `ClientBinary`            | integer     | 0/1                     |
| `TTL`                     | integer     | 0/1                     |
| `CommunicationAssistance` | string      |                         |
| `HCPLevel`                | integer     |                         |
| `Notes`                   | string      |                         |
| `Comments`                | string      |                         |
| `Finalised`               | integer     | 0/1                     |
| `StartDate`               | string      | Date                    |
| `FollowUpDate`            | string      | Date                    |
| `FinalisedDate`           | string      | Date                    |
| `LanguageOther`           | string      |                         |
| `Allergy`                 | string      |                         |
| `PrimaryDisability`       | string      |                         |
| `AssociatedDisability`    | string      |                         |
| `HealthInfo`              | string      |                         |
| `MedicationNote`          | string      |                         |
| `FinanceLegalStatus`      | string      |                         |
| `LegalOrders`             | string      |                         |
| `VulnerableFinancial`     | integer     | 0/1                     |
| `_LastModTime`            | string      | Datetime                |
| `_LastModUser`            | string      | Email                   |
| `_CreateTime`             | string      | Datetime                |
| `_CreateUser`             | string      | Email                   |
| `Status`                  | string      |                         |

***

### GET /Referral

Returns all referral agencies.

**Query parameters:** None

**Response fields:**

| Field             | Type    | Notes |
| ----------------- | ------- | ----- |
| `AgencyId`        | integer |       |
| `AgencyCode`      | string  |       |
| `Name`            | string  |       |
| `Title`           | string  |       |
| `FirstName`       | string  |       |
| `LastName`        | string  |       |
| `Phone`           | string  |       |
| `Phone2`          | string  |       |
| `Mobile`          | string  |       |
| `Fax`             | string  |       |
| `Address1`        | string  |       |
| `Address2`        | string  |       |
| `Suburb`          | string  |       |
| `State`           | string  |       |
| `PostCode`        | string  |       |
| `Email`           | string  |       |
| `Website`         | string  |       |
| `Note`            | string  |       |
| `AccountType`     | string  |       |
| `ContactType`     | string  |       |
| `CorporateStatus` | string  |       |
| `Status`          | string  |       |
| `Area`            | string  |       |
| `Area2`           | string  |       |
