---
schema_version: "1"
id: fbe9f9099d3ed9c3e0a5e234596bb1110214b22e5d4c4cbb1b8ea7c725fc48ba
title: Get Available 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/uc5-get-available-resources.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-get-available-resources.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: eb18c074135ad993c0ea9ba452c92dc92625ee416d26ce3f63c4414fd01250e2
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Get Available Resources

Retrieve the resources that are available for an anonymous appointment.

A service resource represents an employee from your organization, such as a loan officer, investment adviser, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. This task explains how to retrieve service resources that match various criteria such as work type group, territory, start time, and end time from the selected service appointment. Use the `getAppointmentCandidates` REST API to fetch the available service resources based on work type group and service territory.

Make a POST request on the `getAppointmentCandidates` REST API by passing the required `workTypeGroupId`, `territoryIds`, `startTime`, and `endTime` parameters.

Use this URI for the request:

```nolang
https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/scheduling/getAppointmentCandidates
```

Where `YOUR_INSTANCE` is a variable.

Use this request body with the POST request:

```nolang
{
   "startTime" : START_TIME,
   "endTime" : END_TIME,
   "territoryIds" : [TERRITORY_IDS]
   "workType" : 
       {
           "id": WORK_TYPE_ID       }
}
```

Where `START_TIME`, `END_TIME`, `TERRITORY_IDS`, and `WORK_TYPE_ID` are variables.

This code snippet is an example request body:

```nolang
{
    "startTime" : "2021-10-25T17:30:00.000+0000",
    "accountId" : "001B000001McLhMIAV",
    "territoryIds" : ["0HhB0000000TaHOKA0"],
    "workType" : 
        {
            "id": "08qB0000000UF63IAG"
        }
    
 }
```

The request returns a list of anonymous resources that match the criteria specified in the request body.

```nolang
{
  "candidates": [
    {
      "endTime" : "2021-10-25T18:30:00.000+0000",
      "resources" : [ "0HnB0000000TavDKAS" ],
      "startTime" : "2021-10-25T17:30:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
    }, {
      "endTime" : "2021-10-25T19:00:00.000+0000",
      "resources" : [ "0HnB0000000TavDKAS" ],
      "startTime" : "2021-10-25T18:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
    }, {
      "endTime" : "2021-10-25T19:30:00.000+0000",
      "resources" : [ "0HnB0000000TavDKAS" ],
      "startTime" : "2021-10-25T18:30:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
    }, {
      "endTime" : "2021-10-25T20:00:00.000+0000",
      "resources" : [ "0HnB0000000TavDKAS" ],
      "startTime" : "2021-10-25T19:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
    }  ]
}
```

