# 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](/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.
