API Query Library: Provider Schedules by Location

Modified on Tue, Jun 24 at 12:38 PM

his article explains how to use the Get Provider Schedule Templates query to retrieve provider schedules by location in Vetspire. You’ll also find clear definitions for each field returned in the API response.


Purpose

This query is designed to:

  • View which providers are scheduled at specific locations

  • See the schedule templates used for those assignments

  • Confirm which locations are tied to each template

  • Identify whether locations are currently active


GraphQL Query Example

query GetProviderScheduleTemplates {
  locations {
    providerSchedules {
      scheduleTemplate {
        id
        name
        locations {
          isActive
          id
          name
        }
      }
      id
      providerId
      end
    }
  }
}

Sample Response

Below is an example of the API response with modified, realistic data for training purposes:

{
  "providerSchedules": [
    {
      "end": "2025-07-01",
      "id": "1799991",
      "providerId": "620001",
      "scheduleTemplate": {
        "id": "5401",
        "name": "7B-M14",
        "locations": [
          {
            "id": "17201",
            "isActive": true,
            "name": "B DFW Preston Rd"
          },
          {
            "id": "23088",
            "isActive": true,
            "name": "B AUS Congress Ave"
          },
          {
            "id": "17205",
            "isActive": false,
            "name": "B DFW Mockingbird Ln"
          }
        ]
      }
    },
    {
      "end": "2025-07-05",
      "id": "1799992",
      "providerId": "620001",
      "scheduleTemplate": {
        "id": "5401",
        "name": "7B-M14",
        "locations": [
          {
            "id": "17201",
            "isActive": true,
            "name": "B DFW Preston Rd"
          },
          {
            "id": "23088",
            "isActive": true,
            "name": "B AUS Congress Ave"
          },
          {
            "id": "17205",
            "isActive": false,
            "name": "B DFW Mockingbird Ln"
          }
        ]
      }
    }
  ]
}

Field Definitions

FieldTypeDescription
locationsArrayList of all locations in your organization. May include provider schedules.
providerSchedulesArrayList of schedule assignments for providers at each location.
providerSchedules.idStringUnique identifier for this provider schedule instance.
providerSchedules.providerIdStringThe Vetspire user ID of the assigned provider.
providerSchedules.endDate StringThe end date for this schedule assignment, in YYYY-MM-DD format.
providerSchedules.scheduleTemplateObjectDetails of the schedule template applied to the provider.
scheduleTemplate.idStringUnique identifier for the schedule template.
scheduleTemplate.nameStringName or label of the schedule template.
scheduleTemplate.locationsArrayLocations where the schedule template is applied.
locations[].idStringVetspire unique identifier for the location.
locations[].nameStringLocation name (typically includes city and street).
locations[].isActiveBooleanIndicates if the location is currently active (true = active, false = inactive).

Common Use Cases

  • View assigned schedules for providers at specific locations

  • Audit which locations use each template

  • Confirm if templates are applied to inactive locations

  • Review template reuse across multi-location organizations


Additional Notes

  • Templates can be shared across locations; updating a template affects all linked locations

  • Provider IDs correspond to Vetspire user records; a secondary query may be used to pull provider names

  • The isActive field is helpful to identify inactive locations for template cleanup or updates


Need Help?

If you need assistance running this query or interpreting results, please contact Vetspire Support through chat or by submitting a Freshdesk ticket.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

https://support.vetspire.com/a/admin/portals/70000004548/themes