---
schema_version: "1"
id: 58ec01cc79d06c95aea8c009f0a4d1a963fae6b61198c2624db77f0a591bbc53
title: Guest Referral
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/health_cloud_object_reference/connect_resources_guest_referral.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_resources_guest_referral.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 06a1cc2bb65b474f7468fca28be50a36785b6c0be5e7a774d0540eeb0e0442c1
description: Create a patient referral in a Salesforce org from an OOTB guest web form.
---
# Guest Referral

Create a patient referral in a Salesforce org from an OOTB guest web form.

When you send a request to create a patient referral, the API creates records in multiple objects, such as PersonAccount, ClinicalServiceRequest, and ClinicalServiceRequestDetail to store the patient referral information.

## Resource

/connect/health/referral-management/guest-referrals

## Resource Example

Replace {yourInstance} with the My Domain name of your Salesforce org.

https://{yourInstance}.salesforce.com/services/data/v68.0/connect/health/referral-management/guest-referrals

## Available Version

60.0

## HTTP Methods

POST

## JSON example

Here’s an example request to create a patient referral from the OOTB web form filled by a guest user.

{
   "captchaToken":{
      "type":"ReCaptcha",
      "token":"09APYnBZUChiG3s985dvsz9eHvoAMIoa6lB0qeDvL-pZjNvZ3Qg9HgZVRo4rAxebgl\_7H1ZqavwGwecshDuL0K1K9rfv0eI\_dn7pqyGA",
      "siteKeyDeveloperName":"GoogleSiteKey"
   },
   "patient":{
      "fields":{
         "FirstName":"Charles",
         "LastName":"Green",
         "Phone":"8012345678"
      }
   },
   "referralDetails":\[
      {
         "detailType":"Insurance",
         "detailRecordType":"Member Plan",
         "fields":{
            "Name":"Aetna PPO",
            "MemberNumber":"2345678"
         }
      },
      {
         "detailType":"Based On",
         "detailRecordType":"Health Condition",
         "fields":{
            "Condition Status":"Condition",
            "Diagnostic Status":"Status"
         }
      }
   \],
   "referralNotes":"This is an urgent request",
   "referral":{
      "fields":{
         "PatientInstruction":"Need Appointment ASAP.",
         "Priority":"Urgent"
      }
   }
}

Here’s an example request to create a patient referral with the provided performers and requesters in the OOTB guest web form.

{
   "captchaToken": {
        "type": "ReCaptcha",
        "token": "09APYnBZUChiG3s985dvsz9eHvoAMIoa6lB0qeDvL-pZjNvZ3Qg9HgZVRo4rAxebgl\_7H1ZqavwGwecshDuL0K1K9rfv0eI\_dn7pqyGA",
        "siteKeyDeveloperName": "GoogleSiteKey"
    },
  "patient": {
    "fields": {
      "FirstName": "Joe",
      "LastName": "Clark",
      "Phone": "801XXXXX89"
    }
  },
  "referralDetails": \[
    {
      "detailType": "Insurance",
      "detailRecordType": "Member Plan",
      "fields": {
        "Name": "Aetna PPO",
        "MemberNumber": "2345678"
      }
    },
    {
      "detailType": "Insurance",
      "detailRecordType": "Member Plan",
      "detailRecordId": "0SqRM0000004F2z0AE"
    },
    {
      "detailType": "Body Site",
      "detailRecordType": "Health Condition",
      "detailCodeId": "0hsRM000000043aYAA"
    },
    {
      "detailType": "Reason Reference",
      "detailRecordId": "0j4RM0000004MunYAE"
    }
  \],
  "requester": {
    "id": "0cmRM0000004nAgYAI"
  },
  "performers": \[
    {
      "id": "0cmRM0000000l2JYAQ"
    },
    {
      "id": "0cmRM0000000tnoYAA"
    }
  \],
  "referralNotes": "This is an urgent request",
  "referral": {
    "fields": {
      "Priority": "Routine",
      "Status": "Draft",
      "Type": "Plan"
    }
  }
}

## Properties

<table class="featureTable sort_table" summary="">
          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d629252e128">Name</th>
              <th class="featureTableHeader vertical-align-top " id="d629252e130">Type</th>
              <th class="featureTableHeader vertical-align-top " id="d629252e132">Description</th>
              <th class="featureTableHeader vertical-align-top " id="d629252e134">Required or Optional</th>
              <th class="featureTableHeader vertical-align-top " id="d629252e136">Available Version</th>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">captchaToken</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_captcha_token_input.htm" title="Input representation of a Google captcha verification token.">Captcha Token
                  Input</a></td>
              <td class="entry" headers="d629252e132" data-title="Description">Google captcha verification token. <p class="p">Because the referral information comes from a web form,
                  this API expects a captcha token for security reasons. The guest referral
                  API calls the Google API to verify the provided captcha. </p>
                <p class="p">A Google
                  captcha token is valid only for 2 minutes.</p>
              </td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Required</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">patient</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_record_fields_input.htm" title="Input representation of the request to create a generic object, such as an account, or referral details.">Record Fields
                  Input</a>[]
              </td>
              <td class="entry" headers="d629252e132" data-title="Description">Account details of the patient being referred.</td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Required</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">performer</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_record_fields_input.htm" title="Input representation of the request to create a generic object, such as an account, or referral details.">Record Fields
                  Input</a>[]
              </td>
              <td class="entry" headers="d629252e132" data-title="Description">List of healthcare providers who perform the service. <p class="p">You can provide a maximum of 5
                  provider IDs in a request.</p>
              </td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Optional</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">referral</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_record_fields_input.htm" title="Input representation of the request to create a generic object, such as an account, or referral details.">Record Fields
                  Input</a>[]
              </td>
              <td class="entry" headers="d629252e132" data-title="Description">Referral information.</td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Required</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">referralDetails</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_referral_detail_input.htm" title="Input representation of the request to create patient referral details.">Referral Detail
                  Input</a>[]
              </td>
              <td class="entry" headers="d629252e132" data-title="Description">Patient details, such as, insurance, and health condition.</td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Optional</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">referralNotes</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">String</td>
              <td class="entry" headers="d629252e132" data-title="Description">Referral notes.</td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Optional</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d629252e128" data-title="Name"><samp class="codeph nolang">requester</samp></td>
              <td class="entry" headers="d629252e130" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_requests_record_fields_input.htm" title="Input representation of the request to create a generic object, such as an account, or referral details.">Record Fields
                  Input</a>[]
              </td>
              <td class="entry" headers="d629252e132" data-title="Description">Information about the provider requesting the service. A requester can be an Account, Asset,
                Healthcare Provider, or a <samp class="codeph nolang">CareRegisteredDevice</samp> object. <p class="p">If the requester is new, provide
                  information to create an account.</p>
              </td>
              <td class="entry" headers="d629252e134" data-title="Required or Optional">Optional</td>
              <td class="entry" headers="d629252e136" data-title="Available Version">60.0</td>
            </tr>
          </tbody>
        </table>

## Response Body for POST

[Guest Referral Output](https://developer.salesforce.com/docs/atlas.en-us.health_cloud_object_reference.meta/health_cloud_object_reference/connect_responses_guest_referral_output.htm "Output representation of the request to create a guest referral.")