---
schema_version: "1"
id: c208f55477dc22908f9b582c4ccdea4d1c4b3dd14993db8d93b6224771715216
title: Get Actual Service Resources
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-scheduler-dev-guide/guides/salesforce-scheduler/build-custom-apps/usecase11/uc11-get-actual-appointment-candidates.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-actual-appointment-candidates.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 269a0a6c81f1aa98dae46c986c109f3a0154df334be9d86194e66e5decb89a7f
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Get Actual Service Resources

Retrieve the actual service resources—an employee from your company, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist who attends appointments with clients—based on the work type group and service territory that’s assigned to a service appointment. Business managers or administrators can then assign an available service resource to an appointment.

1.  Make a `POST` request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` and `territoryIds` parameters.

    **note:** Specify the shift’s scheduling policy ID to show only the actual resources who have set regular working hours with shifts. For more information, see [Configure Scheduling Policy to Enforce Shifts](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-assign-scheduling-policy-to-actual-resource.md).

    **Resource URI**

    ```nolang
    https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates
    ```

    Where `YOUR_INSTANCE` is a variable.

    **Sample Request**

    ```nolang
    {
      "startTime": "2022-10-01T17:00:00.000+0000",
      "endTime": "2022-10-08T18:00:00.000+0000",
      "workTypeGroupId": "0VSS70000004DvWOAU",
      "schedulingPolicyId": "0VrS70000004CEhKAM",
      "territoryIds": [
        "0HhS70000004F9zKAE"
      ]
    }
    ```

    **Sample Response**

    The API returns the service resources available for the specified time slots.

    ```nolang
    {
      "candidates": [
        {
          "endTime": "2022-10-01T17:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T17:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T18:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T17:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T18:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T18:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T19:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T18:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T19:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T19:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T20:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T19:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T20:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T20:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T21:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T20:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T21:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T21:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T22:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T21:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T22:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T22:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T23:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T22:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-01T23:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T23:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-02T00:00:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-01T23:30:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        },
        {
          "endTime": "2022-10-02T00:30:00.000+0000",
          "resources": [
            "0HnS700000007xwKAA"
          ],
          "startTime": "2022-10-02T00:00:00.000+0000",
          "territoryId": "0HhS70000004F9zKAE"
        }
      ]
    }
    ```

2.  Parse the JSON response, and show the actual service resources on a page. Business managers or administrators can select an actual resource for the appointment.


