Accounts Queries

These queries allow you to interact with accounts data.

accounts

Arguments

ArgumentTypeDescription
afterStringCursor for forward pagination
beforeStringCursor for backward pagination
filtersAccountsFiltersFilters
firstIntFirst
lastIntLast
orderBy[AccountsOrderBy]Order by
Example Query
query(
$filters: AccountsFilters,
$first: Int,
$orderBy: [AccountsOrderBy]
) {
accounts(
filters: $filters,
first: $first,
orderBy: $orderBy
) {
edges {
node {
id
# Add other fields you need
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Variables
{
"filters": {},
"first": 1,
"orderBy": {}
}

accountsCount

Returns: Int

Arguments

ArgumentTypeDescription
filtersAccountsFiltersFilters
Example Query
query($filters: AccountsFilters) {
accountsCount(filters: $filters) {
id
# Add other fields you need
}
}
Variables
{
"filters": {}
}

addresses

Returns: [Address]

Arguments

ArgumentTypeDescription
limitIntMaximum number of results to return
offsetIntNumber of results to skip for pagination
updatedAtEndNaiveDateTimeUpdated at end
updatedAtStartNaiveDateTimeUpdated at start
Example Query
query(
$limit: Int,
$offset: Int,
$updatedAtEnd: NaiveDateTime,
$updatedAtStart: NaiveDateTime
) {
addresses(
limit: $limit,
offset: $offset,
updatedAtEnd: $updatedAtEnd,
updatedAtStart: $updatedAtStart
) {
id
# Add other fields you need
}
}
Variables
{
"limit": 1,
"offset": 1,
"updatedAtEnd": {},
"updatedAtStart": {}
}

apiKeys

Returns: [ApiKey!]!

Lookup API keys for your org

Example Query
query {
apiKeys {
id
# Add other fields you need
}
}

checkDuplicatePhoneNumber

Returns: Boolean

Arguments

ArgumentTypeDescription
inputrequiredPhoneNumberInput!Input
Example Query
query($input: PhoneNumberInput!) {
checkDuplicatePhoneNumber(input: $input) {
id
# Add other fields you need
}
}
Variables
{
"input": {}
}

client

Returns: Client

Lookup a specific client by id

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
Example Query
query($id: ID!) {
client(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

clientTag

Returns: ClientTag

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
Example Query
query($id: ID!) {
clientTag(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

clientTags

Returns: [ClientTag]
Example Query
query {
clientTags {
id
# Add other fields you need
}
}

clients

Returns: [Client]

Get a list of clients within your organization's database. Depending on how many providers your organization has, you may need to page through your data with filters.

Arguments

ArgumentTypeDescription
filtersClientFiltersFilters
insertedAtEndNaiveDateTimeInserted at end
insertedAtStartNaiveDateTimeInserted at start
limitIntMaximum number of results to return
offsetIntNumber of results to skip for pagination
sortBySortOptionsSort by
updatedAtEndNaiveDateTimeUpdated at end
updatedAtStartNaiveDateTimeUpdated at start
Example Query
query(
$filters: ClientFilters,
$insertedAtEnd: NaiveDateTime,
$insertedAtStart: NaiveDateTime,
$limit: Int,
$offset: Int,
$sortBy: SortOptions,
$updatedAtEnd: NaiveDateTime,
$updatedAtStart: NaiveDateTime
) {
clients(
filters: $filters,
insertedAtEnd: $insertedAtEnd,
insertedAtStart: $insertedAtStart,
limit: $limit,
offset: $offset,
sortBy: $sortBy,
updatedAtEnd: $updatedAtEnd,
updatedAtStart: $updatedAtStart
) {
id
# Add other fields you need
}
}
Variables
{
"filters": {},
"insertedAtEnd": {},
"insertedAtStart": {},
"limit": 1,
"offset": 1,
"sortBy": {},
"updatedAtEnd": {},
"updatedAtStart": {}
}

clientsCount

Returns: Int

Arguments

ArgumentTypeDescription
filtersClientFiltersFilters
insertedAtEndNaiveDateTimeInserted at end
insertedAtStartNaiveDateTimeInserted at start
sortBySortOptionsSort by
Example Query
query(
$filters: ClientFilters,
$insertedAtEnd: NaiveDateTime,
$insertedAtStart: NaiveDateTime,
$sortBy: SortOptions
) {
clientsCount(
filters: $filters,
insertedAtEnd: $insertedAtEnd,
insertedAtStart: $insertedAtStart,
sortBy: $sortBy
) {
id
# Add other fields you need
}
}
Variables
{
"filters": {},
"insertedAtEnd": {},
"insertedAtStart": {},
"sortBy": {}
}

coowners

Returns: [Coowner]

Arguments

ArgumentTypeDescription
limitIntMaximum number of results to return
offsetIntNumber of results to skip for pagination
updatedAtEndDateTimeUpdated at end
updatedAtStartDateTimeUpdated at start
Example Query
query(
$limit: Int,
$offset: Int,
$updatedAtEnd: DateTime,
$updatedAtStart: DateTime
) {
coowners(
limit: $limit,
offset: $offset,
updatedAtEnd: $updatedAtEnd,
updatedAtStart: $updatedAtStart
) {
id
# Add other fields you need
}
}
Variables
{
"limit": 1,
"offset": 1,
"updatedAtEnd": {},
"updatedAtStart": {}
}

countNewClients

Returns: [DateCount]

Count new clients based on filters between a range and segment

Arguments

ArgumentTypeDescription
endDateTimeEnding point for the range
segmentrequiredTimeSegment!Segment
startDateTimeStarting point for the range
Example Query
query(
$end: DateTime,
$segment: TimeSegment!,
$start: DateTime
) {
countNewClients(
end: $end,
segment: $segment,
start: $start
) {
id
# Add other fields you need
}
}
Variables
{
"end": {},
"segment": {},
"start": {}
}

externalCommPreferences

Arguments

ArgumentTypeDescription
clientIdrequiredID!ID of the client (pet owner)
Example Query
query($clientId: ID!) {
externalCommPreferences(clientId: $clientId) {
id
# Add other fields you need
}
}
Variables
{
"clientId": "1"
}

externalSearch

Arguments

ArgumentTypeDescription
inputExternalSearchInputInput data for external search operation
Example Query
query($input: ExternalSearchInput) {
externalSearch(input: $input) {
id
# Add other fields you need
}
}
Variables
{
"input": {}
}

permissions

Returns: [Permission!]!

Arguments

ArgumentTypeDescription
locationIdrequiredID!ID of the location
Example Query
query($locationId: ID!) {
permissions(locationId: $locationId) {
id
# Add other fields you need
}
}
Variables
{
"locationId": "1"
}

phoneNumbers

Returns: [PhoneNumber]

Arguments

ArgumentTypeDescription
limitIntMaximum number of results to return
offsetIntNumber of results to skip for pagination
updatedAtEndNaiveDateTimeUpdated at end
updatedAtStartNaiveDateTimeUpdated at start
Example Query
query(
$limit: Int,
$offset: Int,
$updatedAtEnd: NaiveDateTime,
$updatedAtStart: NaiveDateTime
) {
phoneNumbers(
limit: $limit,
offset: $offset,
updatedAtEnd: $updatedAtEnd,
updatedAtStart: $updatedAtStart
) {
id
# Add other fields you need
}
}
Variables
{
"limit": 1,
"offset": 1,
"updatedAtEnd": {},
"updatedAtStart": {}
}

provider

Returns: Provider

Lookup a specific provider by id. All users in Vetspire are listed as a provider and have an id.

Arguments

ArgumentTypeDescription
idrequiredID!provider's primary id
Example Query
query($id: ID!) {
provider(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

providerAuthToken

Returns: String

Arguments

ArgumentTypeDescription
providerIdrequiredID!ID of the provider
Example Query
query($providerId: ID!) {
providerAuthToken(providerId: $providerId) {
id
# Add other fields you need
}
}
Variables
{
"providerId": "1"
}

providerRole

Returns: ProviderRole

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
Example Query
query($id: ID!) {
providerRole(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

providerRoles

Returns: [ProviderRole!]!

Arguments

ArgumentTypeDescription
updatedAtEndNaiveDateTimeUpdated at end
updatedAtStartNaiveDateTimeUpdated at start
Example Query
query(
$updatedAtEnd: NaiveDateTime,
$updatedAtStart: NaiveDateTime
) {
providerRoles(
updatedAtEnd: $updatedAtEnd,
updatedAtStart: $updatedAtStart
) {
id
# Add other fields you need
}
}
Variables
{
"updatedAtEnd": {},
"updatedAtStart": {}
}

providers

Returns: [Provider]

Arguments

ArgumentTypeDescription
ids[ID]List of IDs
locationIdIDID of the location
onlyActiveBooleanOnly active
vetOnlyBooleanVet only
Example Query
query(
$ids: [ID],
$locationId: ID,
$onlyActive: Boolean,
$vetOnly: Boolean
) {
providers(
ids: $ids,
locationId: $locationId,
onlyActive: $onlyActive,
vetOnly: $vetOnly
) {
id
# Add other fields you need
}
}
Variables
{
"ids": "1",
"locationId": "1",
"onlyActive": true,
"vetOnly": true
}

relationships

Returns: [Relationship]
Example Query
query {
relationships {
id
# Add other fields you need
}
}

searchAccounts

Returns: [ClientResult]

Full-text search for clients or patients at a org

Arguments

ArgumentTypeDescription
clientIdIDFilter results by a client ID
limitIntMaximum number of results to return
locationIdIDFilter results by primary location id
orgIdIDID of the org
queryrequiredString!Search query text
Example Query
query(
$clientId: ID,
$limit: Int,
$locationId: ID,
$orgId: ID,
$query: String!
) {
searchAccounts(
clientId: $clientId,
limit: $limit,
locationId: $locationId,
orgId: $orgId,
query: $query
) {
id
# Add other fields you need
}
}
Variables
{
"clientId": "1",
"limit": 1,
"locationId": "1",
"orgId": "1",
"query": "example"
}

totalClients

Returns: Int
Example Query
query {
totalClients {
id
# Add other fields you need
}
}

viewer

Returns: Viewer

Lookup the viewer

Example Query
query {
viewer {
id
# Add other fields you need
}
}

viewerSubscription

Returns: Viewer

Lookup the viewer

Example Query
query {
viewerSubscription {
id
# Add other fields you need
}
}