---
schema_version: "1"
id: 2b58800dc34939625a6ef0e9311eefb0afc9d9f0c1fc47a1f5524f57665360b0
title: Get Service Appointments
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/uc4-get-service-appointments.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-service-appointments.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 06d29ef4c9c0b47a95b1c86d0e5265d32b8081159a2cd617a9d94c36e7e08e9c
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Get Service Appointments

A service appointment represents an appointment booked through Salesforce Scheduler.

1.  Create a page to show the service appointments.

2.  Use the [`Query()`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) request on the ServiceAppointment object to retrieve the list of service appointments associated with an account.

    **Sample Request**

    ```nolang
    https://yourInstance.salesforce.com/services/data/v68.0/query/?q=​SELECT+AppointmentNumber,+Status,+SchedStartTime,+SchedEndTime,+ServiceTerritoryId,+WorkTypeId+From+ServiceAppointment+WHERE+AccountId+=+'001S7000001pFlJIAU'
    ```

    **Sample Response**

    The method returns the available service appointments.

    ```nolang
    {
      "totalSize": 3,
      "done": true,
      "records": [
        {
          "attributes": {
            "type": "ServiceAppointment",
            "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS70000000196IAA"
          },
          "AppointmentNumber": "SA-0003",
          "Status": "Scheduled",
          "SchedStartTime": "2023-03-15T16:00:00.000+0000",
          "SchedEndTime": "2023-03-15T17:00:00.000+0000",
          "ServiceTerritoryId": "0HhS700000001DYKAY",
          "WorkTypeId": null
        },
        {
          "attributes": {
            "type": "ServiceAppointment",
            "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000018wIAA"
          },
          "AppointmentNumber": "SA-0001",
          "Status": "Scheduled",
          "SchedStartTime": "2023-02-15T17:00:00.000+0000",
          "SchedEndTime": "2023-02-15T18:00:00.000+0000",
          "ServiceTerritoryId": "0HhS700000001DYKAY",
          "WorkTypeId": null
        },
        {
          "attributes": {
            "type": "ServiceAppointment",
            "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000019BIAQ"
          },
          "AppointmentNumber": "SA-0004",
          "Status": "Scheduled",
          "SchedStartTime": "2023-03-15T18:00:00.000+0000",
          "SchedEndTime": "2023-03-15T19:00:00.000+0000",
          "ServiceTerritoryId": "0HhS700000001DYKAY",
          "WorkTypeId": null
        }
      ]
    }
    ```

3.  Parse the JSON response, and show the service appointments on a page that you created.


Your users can select a service appointment to modify from the page.

