---
schema_version: "1"
id: 69b1e4d5ae0e69bb23b4e0f3b13fccc1ea4015087a29fe82a09cc145f217b477
title: Change Appointment Time Slots
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/uc7-get-appointment-slots.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-get-appointment-slots.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 89f4a2798e98234beee8f3ebbe38028fe98b2645d51cda422347f36179444f92
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Change Appointment Time Slots

A time slot represents a period in a day when an appointment takes place. a multi-resource service appointment can be modified. To show the alternative tome slots for the assigned resources, use the `getAppointmentSlots` REST API.

Create a page in your app to show the selected primary resource, other required resources, including assets, and the consolidated time slots for the primary service resource and required resources that users select. Here’s how a page can look.

![A representation of the manage multiple service resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_manage_multi_resources.png)

When the user selects one or more required resources, refresh the available time slots by making a POST request to the [getAppointmentSlots](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) REST API and passing the selected required resources along with the `workTypeGroupId` and `territoryId` parameters.

**Resource URI**

```nolang
https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/scheduling/getAppointmentSlots
```

Where `YOUR_INSTANCE` is a variable.

**Sample Request**

```nolang
{
   "startTime" : "2021-10-04T17:00:00.000+0000",
   "endTime" : "2021-10-04T18:00:00.000+0000",
   "workTypeId" : {
       "08qB0000000Tf1FIAS"
   },
   "accountId" : "001B000001McLhMIAV",
   "territoryIds" : ["0HhB0000000TaHOKA0"],
   "primaryResourceId" : "0HnB0000000TavDKAS",
   "requiredResourceIds" : ["0HnB0000000DynTKAS", "0HnB0000000Tav3KAC"]
}
```

**Sample Response**

The API returns the time slots where the selected primary resource and required resources are available for the multi-resource service appointment.

```nolang
{
   "timeSlots" : [ {
      "endTime" : "2021-10-04T18:00:00.000+0000",
      "startTime" : "2021-10-04T17:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   }, {
      "endTime" : "2021-10-04T19:00:00.000+0000",
      "startTime" : "2021-10-04T17:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   }, {
      "endTime" : "2021-10-04T20:00:00.000+0000",
      "startTime" : "2021-10-04T17:30:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   }, {
      "endTime" : "2021-10-04T18:00:00.000+0000",
      "startTime" : "2021-10-04T17:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   }, {
      "endTime" : "2021-10-04T18:30:00.000+0000",
      "startTime" : "2021-10-04T17:30:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   }, {
      "endTime" : "2021-10-04T18:00:00.000+0000",
      "startTime" : "2021-10-04T17:00:00.000+0000",
      "territoryId" : "0HhB0000000TaHOKA0"
   } ]
}
```

Parse the JSON response, and show the available time slots for the selected resources. Here’s how a Select Service Appointment Time page can look.

**note:** A multi-resource appointment can have a maximum of five required service resources: one primary required service resource plus four required service resources, including asset resources.

![A representation of the selected required resources screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_selected_requied_resources.png)

On the next page in your app, you can show the appointment details for the user to review and create the appointment.

