Get Service Appointment Details

A service appointment represents an appointment that’s booked via Salesforce Scheduler. Use a GET method to fetch the details of a service appointment record.

This task helps you retrieve additional details of each service appointment that you listed in the previous task.

Sample Request

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

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

Where YOUR_INSTANCE is a variable.

Sample Response

The request returns the details of an anonymous service appointment.

{
  "totalSize": 1,
  "done": true,
  "records": [
    {
      "attributes": {
        "type": "ServiceAppointment",
        "url": "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf2IAE"
      },
      "Id": "08pB0000000aKf2IAE",
      "SchedEndTime": "2021-10-25T18:30:00.000+0000",
      "SchedStartTime": "2021-10-25T17:30:00.000+0000",
      "ServiceTerritoryId": "0HhB0000000TaHOKA0",
      "WorkTypeId": "08qB0000000UF63IAG"
    }
  ]
}

Use a collection object to capture all the details of service appointments.