Get Service Appointment Details

A service appointment represents an appointment booked through Salesforce Scheduler. Use the GET method on the Service Appointment object to fetch the details of a service appointment record.

Create a page where you can show the details of a multi-resource service appointment record that the user selects.

Sample Request

Here’s a sample GET request to retrieve the service appointment details.

https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,SchedEndTime,SchedStartTime,ServiceTerritoryId,WorkTypeId+FROM+ServiceAppointment+WHERE+id+=+'08pB0000000aJKhIAM'
Sample Response

The method returns the service appointment details.

{
  "totalSize" : 1,
  "done" : true,
  "records" : [ {
    "attributes" : {
      "type" : "ServiceAppointment",
      "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf7IAE"
    },
    "Id" : "08pB0000000aKf7IAE",
    "SchedEndTime" : "2021-10-22T15:45:00.000+0000",
    "SchedStartTime" : "2021-10-22T15:00:00.000+0000",
    "ServiceTerritoryId" : "0HhB0000000TakhKAC",
    "WorkTypeId" : "08qB0000000Tf1FIAS"
  } ]
}

Parse the JSON response, and display the service appointments details on a page so that the user can change the multi-resource service appointment as needed.

On the next page, you can show the user an option to select a different service resource of an existing multi-resource appointment.